1
0
ansible-home-assistant/roles/automations/files/office-ac.yaml

132 lines
3.4 KiB
YAML
Raw Permalink Normal View History

- id: ac_turn_on
2021-06-15 07:32:51 +00:00
alias: '[AC] Computer cave too hot'
description: ''
mode: single
trigger:
- platform: numeric_state
2023-07-09 20:26:06 +00:00
entity_id: sensor.office_sensor_temperature
2022-08-04 22:30:08 +00:00
above: '26'
2021-06-24 18:37:07 +00:00
for:
minutes: 5
2021-06-15 07:32:51 +00:00
condition:
- condition: state
2021-06-24 18:37:07 +00:00
entity_id: input_select.home_mode
state: Day
2022-06-05 23:27:38 +00:00
- condition: state
entity_id: input_boolean.vacation_mode
state: 'off'
2021-07-05 08:56:14 +00:00
- condition: state
2021-10-11 18:15:50 +00:00
entity_id: binary_sensor.dining_window_1_open_close
2021-07-05 08:56:14 +00:00
state: 'off'
- condition: state
2021-10-11 18:15:50 +00:00
entity_id: binary_sensor.dining_window_2_open_close
2021-07-05 08:56:14 +00:00
state: 'off'
- condition: state
2021-10-11 18:15:50 +00:00
entity_id: binary_sensor.office_window_open_close
2021-07-05 08:56:14 +00:00
state: 'off'
2021-06-15 07:32:51 +00:00
action:
- service: script.ac_on
- choose:
- conditions:
- condition: state
2022-08-04 22:30:08 +00:00
entity_id: climate.ac
state: cool
sequence:
- service: climate.set_temperature
target:
entity_id: climate.ac
2023-08-27 19:02:16 +00:00
data_template:
temperature: "{{ state_attr('climate.ac', 'temperature') -1 }} "
2022-08-04 22:30:08 +00:00
- id: ac_precool
alias: '[AC] Pre cool office'
trigger:
- platform: state
entity_id: input_select.home_mode
to: 'Day'
condition:
- condition: state
entity_id: input_select.home_mode
state: Day
- condition: state
entity_id: input_boolean.vacation_mode
state: 'off'
- condition: state
entity_id: binary_sensor.dining_window_1_open_close
state: 'off'
- condition: state
entity_id: binary_sensor.dining_window_2_open_close
state: 'off'
- condition: state
entity_id: binary_sensor.office_window_open_close
state: 'off'
- condition: template
value_template: "{{ state_attr('weather.home', 'forecast')[0].temperature > 24 }}"
2023-09-18 20:58:43 +00:00
action:
- service: script.ac_on
- service: climate.set_temperature
target:
entity_id: climate.ac
data:
temperature: 24
2023-08-27 19:02:16 +00:00
- id: ac_enable
alias: '[AC] Enable back AC when windows are closed'
trigger:
- platform: state
entity_id: binary_sensor.dining_window_1_open_close
to: 'off'
for:
minutes: 1
- platform: state
entity_id: binary_sensor.dining_window_2_open_close
to: 'off'
for:
minutes: 1
- platform: state
entity_id: binary_sensor.office_window_open_close
to: 'off'
for:
minutes: 1
condition:
- condition: state
entity_id: input_select.home_mode
state: Day
- condition: state
entity_id: input_boolean.vacation_mode
state: 'off'
- condition: state
entity_id: binary_sensor.dining_window_1_open_close
state: 'off'
- condition: state
entity_id: binary_sensor.dining_window_2_open_close
state: 'off'
- condition: state
entity_id: binary_sensor.office_window_open_close
state: 'off'
action:
- service: switch.turn_on
entity_id: switch.ac_power_outlet
2023-08-27 19:02:16 +00:00
- id: ac_turn_off
2021-08-11 21:51:12 +00:00
alias: '[AC] Turn off when windows are open'
2021-07-05 08:56:14 +00:00
mode: single
trigger:
- platform: state
2021-10-11 18:15:50 +00:00
entity_id: binary_sensor.dining_window_1_open_close
2021-07-05 08:56:14 +00:00
to: 'on'
for:
minutes: 1
- platform: state
2021-10-11 18:15:50 +00:00
entity_id: binary_sensor.dining_window_2_open_close
2021-07-05 08:56:14 +00:00
to: 'on'
for:
minutes: 1
- platform: state
2021-10-11 18:15:50 +00:00
entity_id: binary_sensor.office_window_open_close
2021-07-05 08:56:14 +00:00
to: 'on'
for:
minutes: 1
action:
- service: script.ac_off