From 59edb3265c83f5de67413cd378332cee8f6375c2 Mon Sep 17 00:00:00 2001 From: Pierre Eisenbrandt Date: Mon, 5 Jan 2026 19:25:47 +0100 Subject: [PATCH] fix dict error --- Climate/bosch_bth-ra_control.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Climate/bosch_bth-ra_control.yaml b/Climate/bosch_bth-ra_control.yaml index 3c26d7a..7ab8500 100644 --- a/Climate/bosch_bth-ra_control.yaml +++ b/Climate/bosch_bth-ra_control.yaml @@ -305,7 +305,11 @@ variables: {{ diff >= 0.4 }} override_duration_exceeded: > {% if setpoint_change_source_entity and override_reset_duration %} - {% set duration_seconds = override_reset_duration.total_seconds() if override_reset_duration is mapping else 0 %} + {% if override_reset_duration is mapping %} + {% set duration_seconds = (override_reset_duration.hours | default(0) | int) * 3600 + (override_reset_duration.minutes | default(0) | int) * 60 + (override_reset_duration.seconds | default(0) | int) %} + {% else %} + {% set duration_seconds = 0 %} + {% endif %} {% if duration_seconds > 0 and setpoint_change_source_entity in states %} {% if states(setpoint_change_source_entity) == 'manual' %} {% set last_update = states[setpoint_change_source_entity].last_updated %} @@ -512,7 +516,11 @@ actions: - PERIODIC_CHECK - condition: template value_template: > - {% set duration_seconds = override_reset_duration.total_seconds() if override_reset_duration is mapping else 0 %} + {% if override_reset_duration is mapping %} + {% set duration_seconds = (override_reset_duration.hours | default(0) | int) * 3600 + (override_reset_duration.minutes | default(0) | int) * 60 + (override_reset_duration.seconds | default(0) | int) %} + {% else %} + {% set duration_seconds = 0 %} + {% endif %} {{ duration_seconds > 0 }} - condition: template value_template: "{{ is_manual_override }}"