From 3e6b6b441ed6479bfdd255e81dd67d9a8d0b4fb9 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Thu, 24 Nov 2022 02:00:17 +0100 Subject: [PATCH] Add thermostat for automations --- configuration/automations/modes.yaml | 22 +++++++++++++++-- scripts/10.modes.yaml | 36 ++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 2 deletions(-) diff --git a/configuration/automations/modes.yaml b/configuration/automations/modes.yaml index ca11974..779f268 100644 --- a/configuration/automations/modes.yaml +++ b/configuration/automations/modes.yaml @@ -1,5 +1,5 @@ - id: sleep_on - alias: '[Mode] Turn on sleep time' + alias: '[Mode] Turn on sleep mode' trigger: - platform: time at: input_datetime.sleep_mode @@ -20,7 +20,7 @@ mode: single - id: sleep_off - alias: '[Mode] Turn off sleep time' + alias: '[Mode] Turn off sleep mode' trigger: - platform: time at: input_datetime.day_mode @@ -28,3 +28,21 @@ - service: input_boolean.turn_off entity_id: input_boolean.sleep_mode mode: single + +- id: sleep_temperature + alias: '[Sleep] Set temperature in bedroom' + trigger: + - platform: state + entity_id: + - input_boolean.sleep_mode + to: 'on' + condition: + - condition: state + entity_id: input_select.home_mode + state: Day + action: + - service: climate.set_temperature + data: + temperature: 25 + target: + entity_id: climate.bedroom_thermostat diff --git a/scripts/10.modes.yaml b/scripts/10.modes.yaml index 37362c7..2e82205 100644 --- a/scripts/10.modes.yaml +++ b/scripts/10.modes.yaml @@ -64,6 +64,13 @@ good_night: data: addon: core_samba - service: script.tv_off + - service: climate.set_temperature + data: + temperature: 20 + target: + entity_id: + - climate.office_thermostat + - climate.dining_thermostat mode: single icon: mdi:weather-night @@ -88,6 +95,19 @@ good_morning: - service: switch.turn_on target: entity_id: switch.coffee_machine_on_off + - service: climate.set_temperature + data: + temperature: 25 + target: + entity_id: + - climate.office_thermostat + - climate.dining_thermostat + - service: climate.set_temperature + data: + temperature: 21 + target: + entity_id: + - climate.bedroom_thermostat mode: single icon: mdi:weather-sunny @@ -144,6 +164,14 @@ leave_home: target: entity_id: climate.ac - service: script.vacuum_today + - service: climate.set_temperature + data: + temperature: 21 + target: + entity_id: + - climate.office_thermostat + - climate.dining_thermostat + - climate.bedroom_thermostat mode: single icon: mdi:home-export-outline @@ -164,5 +192,13 @@ arrive_home: - switch.kitchen_state - switch.hallway_state - switch.kitchen_camera_outlet_on_off + - service: climate.set_temperature + data: + temperature: 25 + target: + entity_id: + - climate.office_thermostat + - climate.dining_thermostat + - climate.bedroom_thermostat mode: single icon: mdi:home-import-outline \ No newline at end of file