Update ha-smart-thermostat-control.yaml
support on error from Google Gemini
This commit is contained in:
parent
434df578ed
commit
66ddee0043
1 changed files with 8 additions and 4 deletions
|
|
@ -3,7 +3,7 @@ blueprint:
|
||||||
author: Andreas Gammelgaard Damsbo
|
author: Andreas Gammelgaard Damsbo
|
||||||
description: |
|
description: |
|
||||||
Advanced thermostat automation with window/door sensors, presence detection, time schedules, and holiday calendar integration.
|
Advanced thermostat automation with window/door sensors, presence detection, time schedules, and holiday calendar integration.
|
||||||
|
|
||||||
SETUP REQUIRED:
|
SETUP REQUIRED:
|
||||||
1. Create an input_boolean helper (Settings > Devices & Services > Helpers > Toggle) for manual override tracking
|
1. Create an input_boolean helper (Settings > Devices & Services > Helpers > Toggle) for manual override tracking
|
||||||
2. Create a timer helper (Settings > Devices & Services > Helpers > Timer) for override duration
|
2. Create a timer helper (Settings > Devices & Services > Helpers > Timer) for override duration
|
||||||
|
|
@ -204,9 +204,13 @@ trigger:
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
thermostat_entities: !input thermostat
|
thermostat_entities: !input thermostat
|
||||||
triggered_thermostat: "{{ trigger.entity_id }}"
|
triggered_thermostat: "{{ trigger.entity_id | default('none') }}"
|
||||||
new_temperature: "{{ trigger.to_state.attributes.temperature | float(0) }}"
|
# FIX: Safely retrieve state objects for non-state triggers (e.g., calendar, numeric_state)
|
||||||
old_temperature: "{{ trigger.from_state.attributes.temperature | float(0) }}"
|
safe_to_state: "{{ trigger.to_state | default({}) }}"
|
||||||
|
safe_from_state: "{{ trigger.from_state | default({}) }}"
|
||||||
|
# Use the safe state objects to get temperatures
|
||||||
|
new_temperature: "{{ safe_to_state.attributes.temperature | float(0) }}"
|
||||||
|
old_temperature: "{{ safe_from_state.attributes.temperature | float(0) }}"
|
||||||
override_helper: !input manual_override_helper
|
override_helper: !input manual_override_helper
|
||||||
day_temp_input: !input day_temp
|
day_temp_input: !input day_temp
|
||||||
night_temp_input: !input night_temp
|
night_temp_input: !input night_temp
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue