3 posts / 0 new
Last post
On at a set time and off at sunrise


I'd like to be able to turn a light on at 07:00 (GMT or BST) and have it turn off at sunrise. Easy during the winter months, but how do I prevent the light coming on when sunrise occurs before 07:00?

Look into the rules API

Look into the rules API documentation. I think it should be possible to create rules with the following condittions and actions.
Note the exact format is incorrect (cannot test right now), but it should be close enough to figure it out.

* /config/localtime IN T07:00:00-T07:00:01
* /sensors/1/state/daylight EQ false
action: Turn on light

* /sensors/1/state/daylight EQ true
action: Turn off light

Michel, many thanks for

Michel, many thanks for pointing me in the right direction. A bit more testing to do but well on the way to doing what I want.

Log in or register to post comments