From ae9badb0fd59f9d07571c785d62dc0cb3be22cd4 Mon Sep 17 00:00:00 2001 From: Carlo Costanzo Date: Mon, 9 Feb 2026 13:27:51 -0500 Subject: [PATCH 1/2] Weather-gate downstairs cool mode Fixes #1571 --- config/packages/alarm.yaml | 22 ++++-- config/packages/climate.yaml | 126 +++++++++++++++++++++++++-------- config/packages/powerwall.yaml | 22 ++++-- 3 files changed, 131 insertions(+), 39 deletions(-) diff --git a/config/packages/alarm.yaml b/config/packages/alarm.yaml index 84facb88..d2c59990 100755 --- a/config/packages/alarm.yaml +++ b/config/packages/alarm.yaml @@ -5,9 +5,10 @@ # ------------------------------------------------------------------- # Alarm Package - Arming helpers, sensors, and alerting. # Related Issue: 1550 +# Related Issue: 1571 # Alarm sensors, customization, and automations for home security. # ------------------------------------------------------------------- -# Notes: Turns HVAC off when doors/windows are open and restores cool mode after closure. +# Notes: Turns HVAC off when doors/windows are open and restores cool mode after closure (weather-gated for downstairs). ###################################################################### homeassistant: customize_glob: @@ -292,10 +293,21 @@ automation: - service: climate.turn_on data: entity_id: climate.downstairs - - service: climate.set_hvac_mode - data: - entity_id: climate.downstairs - hvac_mode: cool + - choose: + - conditions: + - condition: numeric_state + entity_id: sensor.pirateweather_temperature + below: 75 + sequence: + - service: script.send_to_logbook + data: + topic: "CLIMATE" + message: "Skipping downstairs cool mode (outside temp <75F)." + default: + - service: climate.set_hvac_mode + data: + entity_id: climate.downstairs + hvac_mode: cool #-------------------------------------------#------------------------------------------- - alias: 'Alarm lights in Living room' diff --git a/config/packages/climate.yaml b/config/packages/climate.yaml index 7d237d2d..f48fc4e4 100644 --- a/config/packages/climate.yaml +++ b/config/packages/climate.yaml @@ -6,6 +6,7 @@ # Climate Control - Seasonal HVAC automations and sensors. # Thermostat helpers for upstairs/downstairs comfort. # ------------------------------------------------------------------- +# Related Issue: 1571 ###################################################################### # Contact: @CCOSTAN | Entity reference details below # Entity reference and attribute summaries: @@ -142,6 +143,28 @@ script: data: entity_id: climate.downstairs preset_mode: 'eco' + - conditions: + - condition: and + conditions: + - condition: state + entity_id: group.family + state: 'home' + - condition: template + value_template: >- + {{ states('sensor.pirateweather_temperature') in ['unknown','unavailable','none',''] }} + sequence: + - service: script.send_to_logbook + data: + topic: "CLIMATE" + message: "Outside temp unavailable; allowing downstairs cool mode (defaulting to 80F)." + - service: climate.set_hvac_mode + data: + entity_id: climate.downstairs + hvac_mode: cool + - service: climate.set_temperature + data: + entity_id: climate.downstairs + temperature: 80 - conditions: - condition: and conditions: @@ -184,9 +207,8 @@ script: - condition: state entity_id: group.family state: 'home' - - condition: numeric_state - entity_id: sensor.pirateweather_temperature - above: 75 + - condition: template + value_template: "{{ states('sensor.pirateweather_temperature')|float(-999) >= 75 }}" sequence: - service: script.send_to_logbook data: @@ -346,10 +368,21 @@ automation: entity_id: binary_sensor.powerwall_grid_status state: 'on' action: - - service: climate.set_hvac_mode - data: - entity_id: climate.downstairs - hvac_mode: cool + - choose: + - conditions: + - condition: numeric_state + entity_id: sensor.pirateweather_temperature + below: 75 + sequence: + - service: script.send_to_logbook + data: + topic: "CLIMATE" + message: "Skipping downstairs cool mode (outside temp <75F)." + default: + - service: climate.set_hvac_mode + data: + entity_id: climate.downstairs + hvac_mode: cool - service: script.set_downstairs_target_temp_based_on_conditions # Set thermostats to eco mode when everyone is away @@ -372,10 +405,21 @@ automation: data: entity_id: climate.downstairs preset_mode: 'eco' - - service: climate.set_hvac_mode - data: - entity_id: climate.downstairs - hvac_mode: cool + - choose: + - conditions: + - condition: numeric_state + entity_id: sensor.pirateweather_temperature + below: 75 + sequence: + - service: script.send_to_logbook + data: + topic: "CLIMATE" + message: "Skipping downstairs cool mode (outside temp <75F)." + default: + - service: climate.set_hvac_mode + data: + entity_id: climate.downstairs + hvac_mode: cool - service: climate.set_temperature data: entity_id: climate.upstairs @@ -406,11 +450,24 @@ automation: data: entity_id: climate.downstairs preset_mode: 'none' + - choose: + - conditions: + - condition: numeric_state + entity_id: sensor.pirateweather_temperature + below: 75 + sequence: + - service: script.send_to_logbook + data: + topic: "CLIMATE" + message: "Skipping downstairs cool mode (outside temp <75F)." + default: + - service: climate.set_hvac_mode + data: + entity_id: climate.downstairs + hvac_mode: cool - service: climate.set_hvac_mode data: - entity_id: - - climate.downstairs - - climate.upstairs + entity_id: climate.upstairs hvac_mode: cool - service: script.set_downstairs_target_temp_based_on_conditions - service: climate.set_temperature @@ -462,18 +519,29 @@ automation: entity_id: binary_sensor.powerwall_grid_status state: 'on' action: - - service: climate.set_preset_mode - data: - entity_id: climate.downstairs - preset_mode: 'none' - - service: climate.set_hvac_mode - data: - entity_id: climate.downstairs - hvac_mode: cool - - service: climate.set_temperature - data: - entity_id: climate.downstairs - temperature: 77 - - delay: "00:20:00" - - service: script.set_downstairs_target_temp_based_on_conditions - - delay: "02:00:00" # stops it from being triggered again too soon. + - choose: + - conditions: + - condition: numeric_state + entity_id: sensor.pirateweather_temperature + below: 75 + sequence: + - service: script.send_to_logbook + data: + topic: "CLIMATE" + message: "Skipping downstairs cool mode (outside temp <75F)." + default: + - service: climate.set_preset_mode + data: + entity_id: climate.downstairs + preset_mode: 'none' + - service: climate.set_hvac_mode + data: + entity_id: climate.downstairs + hvac_mode: cool + - service: climate.set_temperature + data: + entity_id: climate.downstairs + temperature: 77 + - delay: "00:20:00" + - service: script.set_downstairs_target_temp_based_on_conditions + - delay: "02:00:00" # stops it from being triggered again too soon. diff --git a/config/packages/powerwall.yaml b/config/packages/powerwall.yaml index cd48fba7..e8b5a59b 100755 --- a/config/packages/powerwall.yaml +++ b/config/packages/powerwall.yaml @@ -5,6 +5,7 @@ # ------------------------------------------------------------------- # Tesla Powerwall - Monitoring and outage automations # Related Issue: 1550 +# Related Issue: 1571 # Powerwall status sensors, outage alerting, and load-shedding helpers. # ------------------------------------------------------------------- # Notes: Read more https://www.vcloudinfo.com/2018/01/going-green-to-save-some-green-in-2018.html | Existing Issue #272 @@ -350,10 +351,21 @@ automation: state: 'off' action: - - service: climate.set_hvac_mode - data: - entity_id: climate.downstairs - hvac_mode: cool + - choose: + - conditions: + - condition: numeric_state + entity_id: sensor.pirateweather_temperature + below: 75 + sequence: + - service: script.send_to_logbook + data: + topic: "CLIMATE" + message: "Skipping downstairs cool mode (outside temp <75F)." + default: + - service: climate.set_hvac_mode + data: + entity_id: climate.downstairs + hvac_mode: cool - service: climate.set_hvac_mode data: entity_id: climate.upstairs @@ -366,6 +378,6 @@ automation: - service: script.notify_engine data: title: "Electrical Grid Status {{ (trigger.to_state.state)|replace('True', 'up')|replace('False', 'down') }}." - value1: "All AC systems are set back to normal operations." + value1: "All AC systems are set back to normal operations (downstairs cool may be skipped if outside <75F)." who: 'family' group: 'information' From eca63e0ab6596dcdd30217a07786056ceb099b0c Mon Sep 17 00:00:00 2001 From: Carlo Costanzo Date: Mon, 9 Feb 2026 13:29:18 -0500 Subject: [PATCH 2/2] Simplify downstairs cool gating Keep downstairs cooling decisions in script; avoid duplicate logging. --- config/packages/climate.yaml | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/config/packages/climate.yaml b/config/packages/climate.yaml index f48fc4e4..a7226248 100644 --- a/config/packages/climate.yaml +++ b/config/packages/climate.yaml @@ -368,21 +368,6 @@ automation: entity_id: binary_sensor.powerwall_grid_status state: 'on' action: - - choose: - - conditions: - - condition: numeric_state - entity_id: sensor.pirateweather_temperature - below: 75 - sequence: - - service: script.send_to_logbook - data: - topic: "CLIMATE" - message: "Skipping downstairs cool mode (outside temp <75F)." - default: - - service: climate.set_hvac_mode - data: - entity_id: climate.downstairs - hvac_mode: cool - service: script.set_downstairs_target_temp_based_on_conditions # Set thermostats to eco mode when everyone is away @@ -450,21 +435,6 @@ automation: data: entity_id: climate.downstairs preset_mode: 'none' - - choose: - - conditions: - - condition: numeric_state - entity_id: sensor.pirateweather_temperature - below: 75 - sequence: - - service: script.send_to_logbook - data: - topic: "CLIMATE" - message: "Skipping downstairs cool mode (outside temp <75F)." - default: - - service: climate.set_hvac_mode - data: - entity_id: climate.downstairs - hvac_mode: cool - service: climate.set_hvac_mode data: entity_id: climate.upstairs