Turn on light in the morning until sunrise

Hello,

is there an easy way to turn on the outside light from 6 o’clock until sunrise.
it should only turned on when the sun isn’t rised.

Check the big timer node.

E.g., this will turn on at 14:00 and turn off at 90 minutes before sunset

If you dont have that node available in your node red, you can install it via the upper right (blue circle) → manage palletes

There is also the sunrise/set node

[{"id":"6cd1edae.a9b8b4","type":"sunrise","z":"24e54e48.fd06f2","g":"7873948.5ba166c","name":"","lat":"","lon":"","start":"sunriseEnd","end":"sunsetStart","soff":0,"eoff":0,"x":250,"y":760,"wires":[[],["1d5683bc.0b6ff4"]]},{"id":"1d5683bc.0b6ff4","type":"switch","z":"24e54e48.fd06f2","g":"7873948.5ba166c","name":"on off","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":450,"y":760,"wires":[["e78523.b1d82ae","41c8651e.b0337c"],["91ffd29c.a59518"]]}]

Then sun.sun is available in an event node.

1 Like