Hi everybody,
This is my first post, and not sure if it is the right place to post
Im trying to automate a simple thing… but to be honest, not sure how to do it.
The idea is pretty simple, I’d like to close the curtain, if the illuminance is below 50, and after 20:00.
And set the mode to restart so, if the illuminance condition trigger, but it is not the time, will reload again.
The problem is that the automation never triggers. Probably Im missing something obvious but I dont know what can be.
Restart mode is only for when the automation is triggered while it is still doing something. But this runs very shortly, so the restart mode does not do much.
Two things you need to realise:
triggers only fire when what it checks goes from false to true. That is the only time it starts the automation
2.if you have other conditions that also need to be true, those also need a trigger.
This is all explained here, read it well because it applies to pretty much any automation you’ll write:
So you need to add a trigger for the start of the time period (20:00) in case illuminance is already low at that time. You’ll need to add a condition too, to check the illuminance at the start time. If you want, you can also add a condition for the start of home assistant.
You’ll also need to fight the urge to put in a time trigger: you don’t need it. The automation is only supposed to run when the moment comes to close the curtain: either at 20:00 when it is dark, or at the exact moment when it turns dark after 20:00. If it is already dark, and it is already after 20:00, and the curtain is still open, there probably was a reason why you chose to open it anyway, after the automation had closed it.