From 7b2dbbc6bbedee58da67745a32a27814b8699fec Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Mon, 5 Sep 2022 23:38:34 +0200 Subject: [PATCH] Add ac toggle script --- scripts/80.ac.yaml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/scripts/80.ac.yaml b/scripts/80.ac.yaml index 77c4fc7..9380097 100644 --- a/scripts/80.ac.yaml +++ b/scripts/80.ac.yaml @@ -34,4 +34,21 @@ ac_on: - delay: '0:00:30' - service: climate.turn_on target: - entity_id: climate.ac \ No newline at end of file + 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