This is my first time using Hubitat and I want to make sure that the logic I am using is correct and the best way to do it. I am looking to turn a light on 30 minutes before sunset, and switch off at 8pm. Here is what I have:
Yup. That looks right.
Great, Thanks for the quick reply!
Bonus points, btw, for using the Wait For Events action. Not many people I've seen new to Hubitat know where to find that one.
For the wait event, if the switch is manually powered off and back on during the wait time frame will the "wait for events" action still run?
Yup because the event is waiting for a time.
Problem, though, when "Sunset-30 minutes" is after 8:00 PM, which it is, certain months - your "Wait" will go until 8:00 PM the next day.
Understood, and that makes sense. I set 8pm just for testing. In the end it will be later, but you bring up a good point that I didn't think of. Thanks!
So my rule was set for sunset - 30 minutes. Sunset in my area is 6:40pm, I figured the rule would trigger at 7:10, but it didn't. There was nothing in the log. If I set to a specific time it triggers. I confirmed in settings > location that sunset is correct. Thoughts?
Sunset -30 minutes is 30 minutes before sunset. So if sunset is at 6:40, the rule should have triggered at 6:10.
If you want 7:10, that would be sunset +30 minutes.
That makes sense, but the rule never triggered 30 minutes before either. This rule was setup yesterday.
I don't know then. Is it the same rule as in your first post? That looks OK to me. I have a simple rule that's similar, and it works.