1
0
ansible-home-assistant/configuration/automations/ac.yaml

58 lines
1.4 KiB
YAML

- id: ac-turn-on
alias: '[AC] Computer cave too hot'
description: ''
mode: single
trigger:
- platform: numeric_state
entity_id: sensor.ble_temperature_computer_cave_sensor
above: '27'
for:
minutes: 1
condition:
- condition: state
entity_id: input_select.home_mode
state: Day
- condition: state
entity_id: binary_sensor.computer_cave_window_1_open_close
state: 'off'
- condition: state
entity_id: binary_sensor.computer_cave_window_2_open_close
state: 'off'
- condition: state
entity_id: binary_sensor.living_room_window_open_close
state: 'off'
action:
- 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'
mode: single
trigger:
- platform: state
entity_id: binary_sensor.computer_cave_window_1_open_close
to: 'on'
for:
minutes: 1
- platform: state
entity_id: binary_sensor.computer_cave_window_2_open_close
to: 'on'
for:
minutes: 1
- platform: state
entity_id: binary_sensor.living_room_window_open_close
to: 'on'
for:
minutes: 1
action:
- service: climate.turn_off
target:
entity_id: climate.ac