Sunset/Sunrise Offset in IF Condition

Hi! Is there any way to do a time offset for sunrise/sunset as part of a condition? I see the option when used as a schedule trigger but not in a time condition. For example, I’m hoping to say when x is triggered, if time is 30 min before sunset or after then do y. Thanks!

Offset for sunrise/sunset in IF_Condition is not currently supported, but I’ve noted your request. However, you can still achieve it with a Variable or Virtual Switch along with an additional rule. See the screenshot below for the rule example. The idea here is to reset the variable at midnight, and set the variable value to true when it’s 30 minutes before sunset. (This rule will be triggered at both midnight and 30 minutes before sunset.) Then you can use this variable in other rules’ condition to determine if the current time is at least 30 minutes before sunset. Feel free to let me know if you have any questions.

1 Like

Hey @RyGuy - I moved this post into the Feature Requests category so other users can express their interest by voting and share the feedback in the comments. Please make sure to vote on the first post in the topic so your interest gets counted!

Thanks James! Looks like that will work. And thanks Josh for the post move, I’ve added my vote :slight_smile:

1 Like