Hey,
i want to turn off my ventilation for 60 Minutes.
That means, i want to press a button on the dashboard and the Ventilation turns off. After 60 minutes, the ventilation should turn on automatically.
My Problem is, that I have an automation, which turns off the fan every day from 22 till 7 in the morning.
Sometimes i like to turn off the fan for 60 minutes during the day. When i set a state trigger, then it would switch the fan on after 60 Minutes in the night.
Add a condition in your existing automation that your timer’s state is idle. This will avoid your automation starting to run if you enabled the timer just before your automation started at 22:00.
Create another automation for when your timer goes from active to idle, and add a condition that the time is between 22:00 & 07:00. This will turn on your fan again if the timer ended and the time is between your specified times.
Job done.
Eventually, you might want to move everything into a single automation (depending on your preference), but for now, leave it as is to verify it’s working as intended.
This is not good.
It actually won’t work since the time is always past 6:59.
And your second automation has no triggers so it will trigger constantly
I did update the first one. The Second one is an automation that can be manually triggered. I use trigger-less automations all the time, from UI buttons. Why would it be constantly triggered?
Same idea, I use this to pause / switch off a fish tank pump while the fish are being fed. Will auto resume after 15 minutes. Trigger is a button on Home assistant dashboard or the button in the the smart plug that pump is connected to.
Thank you for your great discussion and helpful input.
You can always rely on the community here!
I am a bit confused since I am an absolute beginner. However, I have now organized my thoughts. I also think that an automation without a trigger is a script. Therefore, I have now written a script and deleted the automation.
One comment - would recommend to replace the long-lived delay with a timer.
The delay in a script will not resume / survive a Home Assistant reboot or a reload of the scripts, which will leave you fan off till such time you correct it.