Hi all,
I am trying to implement the following automation but something isn’t working as I need.
I need the switch.bath_radiator when I manually turn it on to stay on for 3 minutes and the turn off.
After that I need for the next 2 hours to turn on for 1 minute and turn off for 15 minutes in a loop. When the 2 hours passed I need to turn off.
I am trying to make it work, with the automation editor and chatgpt help but I can’t.
This is what I have right now. The first part is working ok but not the second part
- id: Radiator first cycle
alias: Radiator first cycle
triggers:
- trigger: state
entity_id:
- switch.bath_radiator
to: 'on'
for:
hours: 0
minutes: 3
seconds: 0
conditions:
- condition: state
entity_id: input_boolean.bath_radiator_loop_started
state: 'off'
actions:
- action: switch.turn_off
metadata: {}
data: {}
target:
entity_id: switch.bath_radiator
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.bath_radiator_loop_started
mode: single
- id: Radiator loop cycle
alias: Radiator loop cycle
description: ''
triggers:
- trigger: state
entity_id:
- input_boolean.bath_radiator_loop_started
to: 'on'
conditions: []
actions:
- repeat:
until:
- condition: template
value_template: >
{{ (as_timestamp(now()) - as_timestamp(states.input_boolean.bath_radiator_loop_started.last_changed)) >= 7200 }}
sequence:
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.bath_radiator
- delay:
hours: 0
minutes: 1
seconds: 0
- action: switch.turn_off
metadata: {}
data: {}
target:
entity_id: switch.bath_radiator
- delay:
hours: 0
minutes: 15
seconds: 0
- action: switch.turn_off
metadata: {}
data: {}
target:
entity_id: switch.bath_radiator
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.bath_radiator_loop_started
mode: single
Can someone help?