I am trying to put in a place a simple automation where a fan is put on for a set time and then turned off again. Previously, I woudl have created a autoanton rule to turn on and then another to turn off at a set time…
Was just playing about today and am sure there is a simpler way within one Automation rule to do this… So got playing with parallel actions coupled with a delay… But it doesn’t seem to be working and when I enable the parallel action - they don’t turn on…
Am i missing something? Maybe mis-understanding a simple way to achieve this?
I think you misunderstood what parallel actions are. The actions nested under Parallel are initiated at the same time. In your example, switch 1 turns on then switch two turns on; then at the same time commands are sent to turn off both switches and start a delay. The delay runs for 1 minute then the automation stops.
I am sure your switches turn on in a split second so there is no need to execute the two in parallel. It can actually harm if the mechanism you use like Zigbee could not handle them in parallel anyway.
You want to turn on the two switches.
Wait 1 minute
Turns both off again as a normal sequence
A simple delay should be fine.
If you wanted a delay of hours then I would advice having two automations because should you restart HA in the period the switches are on - they will remain on until the next day
It parallels 3 actions. It starts a delay of 1 second. And it turns off the two switches in parallel right away. When the delay expires after 1 second the two switches are already turned off. The delay just delays the time before the automation can be retriggered which is irrelevent as it only gets triggered once per day at specific time. The parallel only does harm.
Your switches turn on and immediately off as you made it