55 lines
1.3 KiB
YAML
55 lines
1.3 KiB
YAML
ac_off:
|
|
alias: AC turn off
|
|
sequence:
|
|
- service: climate.turn_off
|
|
target:
|
|
entity_id: climate.ac
|
|
- delay: '0:05:00'
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: climate.ac
|
|
state: 'off'
|
|
sequence:
|
|
- service: switch.turn_off
|
|
entity_id: switch.ac_power_outlet
|
|
|
|
ac_on:
|
|
alias: AC turn on
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: switch.ac_power_outlet
|
|
state: 'off'
|
|
sequence:
|
|
- service: switch.turn_on
|
|
entity_id: switch.ac_power_outlet
|
|
- repeat:
|
|
until:
|
|
- condition: state
|
|
entity_id: climate.ac
|
|
state: unavailable
|
|
sequence:
|
|
- delay: '0:00:30'
|
|
- service: climate.turn_on
|
|
target:
|
|
entity_id: climate.ac
|
|
|
|
ac_toggle:
|
|
alias: AC toggle
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: switch.ac_power_outlet
|
|
state: 'on'
|
|
sequence:
|
|
- service: script.ac_off
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: switch.ac_power_outlet
|
|
state: 'off'
|
|
sequence:
|
|
- service: script.ac_on
|