From aa18331b51530e4ebeb53ad3e717944776c6ad91 Mon Sep 17 00:00:00 2001 From: Carlo Costanzo Date: Wed, 26 Nov 2025 13:59:36 -0500 Subject: [PATCH] Add grid status condition checks to climate automation in climate.yaml, ensuring HVAC operations only occur when the grid is normal. This prevents conflicts during power outages. Move the entire Nest schedule to Home Assistant. Fixes #1509 --- config/packages/climate.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/config/packages/climate.yaml b/config/packages/climate.yaml index 12d794d8..70fee767 100644 --- a/config/packages/climate.yaml +++ b/config/packages/climate.yaml @@ -183,6 +183,10 @@ automation: entity_id: climate.upstairs attribute: temperature below: 76 + condition: + - condition: state + entity_id: binary_sensor.grid_status + state: 'normal' action: - delay: "00:03:00" - service: climate.set_temperature @@ -205,6 +209,9 @@ automation: - condition: state entity_id: binary_sensor.sleepnumber_carlo_stacey_is_in_bed state: 'on' + - condition: state + entity_id: binary_sensor.grid_status + state: 'normal' - condition: state entity_id: sun.sun state: 'below_horizon' @@ -238,6 +245,9 @@ automation: - condition: state entity_id: input_boolean.guest_mode state: 'off' + - condition: state + entity_id: binary_sensor.grid_status + state: 'normal' action: - service: climate.set_hvac_mode data: @@ -323,6 +333,9 @@ automation: - condition: state entity_id: input_boolean.guest_mode state: 'off' + - condition: state + entity_id: binary_sensor.grid_status + state: 'normal' action: - service: climate.set_preset_mode data: @@ -367,6 +380,10 @@ automation: trigger: - platform: time at: "03:00:00" + condition: + - condition: state + entity_id: binary_sensor.grid_status + state: 'normal' action: - service: climate.set_hvac_mode data: @@ -397,6 +414,9 @@ automation: value_template: "{{ now().month in [10, 11, 12, 1, 2, 3] }}" - condition: template # Only run if AC is idle (prevents fighting other automations) value_template: "{{ state_attr('climate.downstairs', 'hvac_action') == 'idle' }}" + - condition: state # Never run if the grid is down and running on powerwall. + entity_id: binary_sensor.grid_status + state: 'normal' action: - service: climate.set_preset_mode data: