Compare sun events to time

Hi,

I'm using node red with home assistant to switch on my home lights when I'm not at home.

I was using a time range node, set to Start Time 7:00 and End Time SunriseEnd.

This worked pretty well until recently, when SunriseEnd happens before 7:00, which now means the Timerange node gives true almost the entire day and night, with 2am lights in my room switching on when my phone disconnects from wifi... :rofl:

What option do i have to return true if currenttime is between 7am and SunriseEnd, only when SunriseEnd is later than 7am?

Thanks!

Thanks

Tom

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.