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

View File

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

View File

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