Good morning everyone!
I’m back here:
is it possible to make an automation that reloads as long as the trigger is true?
To explain me better: I have some netatmo valves and I have created a trigger that when I open the windows the valves are set to X degrees. Netatmo allows me to manually set the temperature for a maximum of 3 hours … if I have the window open for 4 hours the valves start working again … so I would need something that after YY time will collapse the trigger and if it is still true, reset the valves to X degrees.
Thanks to those who will dedicate time to me!
at the end of you current automation add a delay for x hours, then trigger itself.
this won’t work if HA gets interrupted
or
Instead of a trigger of when you open the window, perhaps a time pattern trigger, so trigger every 30 mins
Of course you then need to adjust the conditions to check if the window has been open for a certain length of time, otherwise it may coincidently activate 2 mins after you have first opened them
Keep in mind when you want to explain better then make sure it actually is better.
Why do you say X and YY don’t give us any entities? Do you really think that is good?
Blockquote
Keep in mind when you want to explain better then make sure it actually is better.
Why do you say X and YY don’t give us any entities? Do you really think that is good?
Excuse me I thought I would explain better, next time I will improve!
===
I read about the repeat-until function, thanks but I have a doubt: my code (which I now post) is a bit more complex, if I put the repeat as I put it it repeats all the actions or only those inside the repeat ? Because the snapshot of the air conditioner I would not want to be repeated, only the setting of the valves at 7 degrees I would like it to be repeated
I believe the biggest issue here is the three hour delay.
I’m just thinking out loud here, what if I stead of looping and delaying we trigger on temperature change on the climate set temperature and have a condition to check the window, if this is true then set it back down again.
This will split up your automation to one part that first triggers on the windows and sets the temperature down, then a second part (or second automation) that triggers on the set temperature change. That way the automations are instant and not waiting which is prone to failure.
Does it make sense? I don’t know the devices and what you can do so I just say what I’m thinking.