I have an issue with an automation I try to get up and running.
I have a fan which should run from 8 a.m. till 23 p.m. every 3 hours for 1.5 hours.
I can start it manually but it just run for 1.5 hours and that’s it. Maybe you can give me a tip:
Here’s another approach. The first automation turns on the fan every 3 hours starting at 08:00. The second automation turns off the fan after it’s been on for 1.5 hours.
- alias: 'Climate On Lüftung HWR'
trigger:
- platform: time
at: '08:00:00'
- platform: time
at: '11:00:00'
- platform: time
at: '14:00:00'
- platform: time
at: '17:00:00'
- platform: time
at: '20:00:00'
action:
- service: switch.turn_on
entity_id: switch.lufter_hwr
- alias: 'Climate Off Lüftung HWR'
trigger:
- platform: state
entity_id: switch.lufter_hwr
from: 'off'
to: 'on'
for: '01:30:00'
action:
- service: switch.turn_off
entity_id: switch.lufter_hwr
So the fan will run from 08:00 to 09:30, 11:00 to 12:30, 14:00 to 15:30, etc.
If you turn on the fan manually, the second automation will turn it off after 1.5 hours of operation.