From cfbc7ee7717407e34305da00680db40c68396d9c Mon Sep 17 00:00:00 2001 From: Carlo Costanzo Date: Mon, 4 Aug 2025 11:18:48 -0400 Subject: [PATCH] Add new automation for setting thermostats to eco mode when away and adjust recorder configuration to include Alexa event types. Refactor existing climate automation for improved clarity and functionality. --- config/automation/away.yaml | 28 ------------ config/packages/climate.yaml | 88 ++++++++++++++++++++++++++++++++++++ config/packages/logger.yaml | 2 - config/recorder.yaml | 2 + 4 files changed, 90 insertions(+), 30 deletions(-) diff --git a/config/automation/away.yaml b/config/automation/away.yaml index 58d00de3..91c0a510 100755 --- a/config/automation/away.yaml +++ b/config/automation/away.yaml @@ -40,31 +40,3 @@ - service: switch.turn_off entity_id: switch.back_landscaping - -# Set thermostats to eco mode when everyone is away -- alias: 'Set Thermostats to Eco When Away' - id: 1e2d3c4b-eco-thermostat-away - mode: single - trigger: - - platform: state - entity_id: group.family - to: 'not_home' - condition: - - condition: state - entity_id: group.family - state: 'not_home' - - condition: state - entity_id: input_boolean.guest_mode - state: 'off' - action: - - service: climate.set_preset_mode - data: - entity_id: - - climate.downstairs - - climate.upstairs - preset_mode: 'eco' - - service: script.notify_engine - data: - title: "Thermostat Eco Mode Triggered" - value1: "DEBUG: Everyone is gone and the Automation was triggered." - who: "carlo" diff --git a/config/packages/climate.yaml b/config/packages/climate.yaml index c1ed5dd6..b4fe69ec 100644 --- a/config/packages/climate.yaml +++ b/config/packages/climate.yaml @@ -179,4 +179,92 @@ automation: data: entity_id: climate.downstairs temperature: 76 + - alias: 'Set Downstairs Thermostat to 79 During Daylight' + id: set_downstairs_thermostat_79_daylight + mode: single + trigger: + - platform: state + entity_id: sun.sun + to: 'above_horizon' + - platform: numeric_state + entity_id: climate.downstairs + attribute: temperature + below: 78 + condition: + - condition: state + entity_id: sun.sun + state: 'above_horizon' + - condition: template + value_template: "{{ state_attr('climate.downstairs', 'temperature') < 79 }}" + action: + - service: climate.set_temperature + data: + entity_id: climate.downstairs + temperature: 80 + +# Set thermostats to eco mode when everyone is away + - alias: 'Set Thermostats to Eco When Away' + id: 1e2d3c4b-eco-thermostat-away + mode: single + trigger: + - platform: state + entity_id: group.family + to: 'not_home' + condition: + - condition: state + entity_id: group.family + state: 'not_home' + - condition: state + entity_id: input_boolean.guest_mode + state: 'off' + action: + - service: climate.set_preset_mode + data: + entity_id: + - climate.downstairs + - climate.upstairs + preset_mode: 'eco' + # Automation: Set Thermostats Back to Cool Mode + - alias: 'Set Thermostats to Cool When Home' + id: 1e2d3c4b-cool-thermostat-home + mode: single + trigger: + - platform: state + entity_id: group.family + to: 'home' + - platform: state + entity_id: person.justin + to: 'home' + condition: + - condition: or + conditions: + - condition: state + entity_id: group.family + state: 'home' + - condition: state + entity_id: person.justin + state: 'home' + - condition: state + entity_id: input_boolean.guest_mode + state: 'off' + action: + - choose: + - conditions: + - condition: state + entity_id: group.family + state: 'home' + sequence: + - service: climate.set_preset_mode + data: + entity_id: climate.downstairs + preset_mode: 'cool' + - conditions: + - condition: state + entity_id: person.justin + state: 'home' + sequence: + - service: climate.set_preset_mode + data: + entity_id: climate.upstairs + preset_mode: 'cool' diff --git a/config/packages/logger.yaml b/config/packages/logger.yaml index de6b690a..d5851750 100755 --- a/config/packages/logger.yaml +++ b/config/packages/logger.yaml @@ -3,7 +3,6 @@ # @CCOSTAN # Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig #------------------------------------------- - input_select: log_level: name: Log Level @@ -34,4 +33,3 @@ automation: - service: logger.set_level data: homeassistant.components: "{{ states.input_select.log_level.state }}" - diff --git a/config/recorder.yaml b/config/recorder.yaml index 3c08173a..87ebbe3a 100755 --- a/config/recorder.yaml +++ b/config/recorder.yaml @@ -89,3 +89,5 @@ exclude: - switch.bear_stone - switch.alarm_panel_1_screensaver + event_types: + - alexa_smart_home