From 0fec779f8bcf43c80348f57f9513f8b118da3ea8 Mon Sep 17 00:00:00 2001 From: pgrondek Date: Mon, 5 Jul 2021 10:56:14 +0200 Subject: [PATCH] Update AC automation --- configuration/automations/ac.yaml | 37 +++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/configuration/automations/ac.yaml b/configuration/automations/ac.yaml index cf6c32e..27a4568 100644 --- a/configuration/automations/ac.yaml +++ b/configuration/automations/ac.yaml @@ -1,17 +1,26 @@ -- id: ac_computer_cave +- 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: '26.5' + 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: @@ -22,3 +31,27 @@ hvac_mode: cool target: entity_id: climate.ac + +- id: ac-turn-off + alias: '[AC] Turo 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