What is the difference when writting automation Trigger/Condition with duration specifications for:
- Turn On Switch A for 1 hour
- Switch A is on for 1 hour
I have been trying to write a simple automation for 1 light and 2 fans.
When the light A is turn off, check how long the fan B had been on. If the fan B has been on for more than 1 hour please off fan B and turn on Fan C.
2 Likes
Under When/Trigger, the duration of 1 hour means the rest of the automation won’t trigger until the duration.
Under AND/condition, the duration is based on how long that condition as been held.
The logic you are trying should be doable.
Something like this:
WHEN Switch A turns off
AND FAN B Is On for 1 hour (has been on for 1 hour)
THEN Fan B Off, Fan C, On.
1 Like
Hello, welcome to the forum. The difference between these conditions is important for automation 1.0. In automation 2.0, all conditions in the WHEN section are target (instantaneous), the condition (sensor state) is used in the IF section. Here I described the entire process of triggering triggers for automation, you can read it. Automation 2.0, lesson 1 (continued), description of the algorithm for transitioning automation 1.0 to 2.0
1 Like
To control the lamp operating time, you need to use the parameter I provided in the example (in my example, 10 seconds).