Commit Graph

7 Commits

Author SHA1 Message Date
Paul van Tilburg cb245ba880 Actually cache the new sunrise/sunset data of the correct day 2015-09-22 19:38:48 +02:00
Paul van Tilburg 48004beb92 Share the sunrise/sunset data across rules
Also, rewrite the darkness checking logic a bit.
2015-09-19 16:52:48 +02:00
Paul van Tilburg a894d55f8c Replace the dark_at condition implementation
The previous implementation used the EarthTools Webservices, but this
website has been down for a few months now.  This replacement uses
the Sunset-Sunrise API.  (See also: http://sunrise-sunset.org/api.)
2015-09-18 23:34:32 +02:00
Paul van Tilburg 1bf5e0a7d4 Add support for the `at' condition
This is just the same as having a `from' and `until' condition (the latter
with t + 1 minute).
2015-03-11 22:43:10 +01:00
Paul van Tilburg bcb221cc51 Add the dark_at condition
Use the EarthTools Webservices to determine when the sun sets and when it
rises.  Use these moment to determine when it's dark.
(See also: http://www.earthtools.org/webservices.htm#usage)
2015-01-01 16:56:52 +01:00
Paul van Tilburg b676d6d3e6 Add the weekdays condition 2014-11-22 12:11:08 +01:00
Paul van Tilburg e2921f9c2e Split up the code into separate files
* Rename the Hued class to Hued::Engine so that Hued can be the containing
  module
* Split off the version to lib/hued/version.rb
* Undo Rule being a nested class of Engine
2014-11-16 11:25:13 +01:00