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 }}"