Subscribe to Sunrise/Sunset events

Is there a way to subscribe to these events in HE. Did a quick search of the docs and found nothing so I was hoping someone in the community had this implemented and could point me in the right direction.

@bravenel @chuck.schwer (sorry for @'ing you both twice in one day but it seems like the ABC needs some TLC these days).

subscribe(location, "sunrise", handler)

2 Likes

Thanks Bruce...same for sunset I suppose?

Well, yes, but of course it's spelled differently :upside_down_face:

9 Likes

It's not even Friday yet, we haven't had time to study for this spelling quiz. :stuck_out_tongue_winking_eye:

2 Likes

Is there one for change of date, like when midnight ticks over?

Not a hub event, but how about this in Groovy:

schedule("0 0 0 * * ? *", midnightHandler)

Or in RM a trigger at Certain Time of midnight, similar for Basic Rule.

The end result is the same, something is made to run at midnight.

1 Like

Ok I've used the cron schedule for now, just wondered.

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