1
0

Change AC automations to turn off ac outlet

This commit is contained in:
Przemek Grondek 2022-08-30 00:45:41 +02:00
parent e91e5dbbe6
commit 3c2c676418
4 changed files with 52 additions and 39 deletions

View File

@ -25,6 +25,7 @@
entity_id: binary_sensor.office_window_open_close
state: 'off'
action:
- service: script.ac_on
- choose:
- conditions:
- condition: state
@ -36,16 +37,6 @@
entity_id: climate.ac
data:
temperature: "{{ state_attr('climate.ac', 'temperature') -1 }} "
default:
- service: climate.turn_on
target:
entity_id: climate.ac
- service: climate.set_temperature
data:
temperature: 25
hvac_mode: cool
target:
entity_id: climate.ac
- id: ac-turn-off
alias: '[AC] Turn off when windows are open'
@ -67,6 +58,4 @@
for:
minutes: 1
action:
- service: climate.turn_off
target:
entity_id: climate.ac
- service: script.ac_off

View File

@ -17,6 +17,7 @@
entity_id: input_select.home_mode
state: Night
action:
- service: script.ac_on
- choose:
- conditions:
- condition: state
@ -28,16 +29,6 @@
entity_id: climate.ac
data:
temperature: "{{ state_attr('climate.ac', 'temperature') -1 }} "
default:
- service: climate.turn_on
target:
entity_id: climate.ac
- service: climate.set_temperature
data:
temperature: 24
hvac_mode: cool
target:
entity_id: climate.ac
- id: bedroom-ac-turn-off
alias: '[AC][Bedroom] Turn off AC when it is cold in bedroom'
@ -64,9 +55,7 @@
attribute: temperature
state: '25'
sequence:
- service: climate.turn_off
target:
entity_id: climate.ac
- service: script.ac_off
default:
- service: climate.set_temperature
target:

View File

@ -129,9 +129,7 @@
entity_id: sensor.ble_temperature_computer_cave_sensor
above: "23"
action:
- service: climate.turn_on
target:
entity_id: climate.ac
- service: script.ac_on
- service: climate.set_temperature
data:
temperature: 25

37
scripts/80.ac.yaml Normal file
View File

@ -0,0 +1,37 @@
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