1
0
ansible-home-assistant/roles/scripts/files/80.ac.yaml

57 lines
1.4 KiB
YAML
Raw Normal View History

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:
sequence:
- delay: '0:00:30'
until:
- condition: not
conditions:
- condition: state
entity_id: climate.ac
state: unavailable
- service: climate.turn_on
target:
2022-09-05 21:38:34 +00:00
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