From 2e6fcefca4ac6c0e6a87bfe7f3ec6a7309d0586a Mon Sep 17 00:00:00 2001 From: Pierre Eisenbrandt Date: Wed, 7 Jan 2026 20:42:46 +0100 Subject: [PATCH] secure access to entities --- Climate/bosch_bth-ra_control.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Climate/bosch_bth-ra_control.yaml b/Climate/bosch_bth-ra_control.yaml index 53bd48c..af3e2ff 100644 --- a/Climate/bosch_bth-ra_control.yaml +++ b/Climate/bosch_bth-ra_control.yaml @@ -205,6 +205,8 @@ variables: {{ remote_temperature_entity and states(remote_temperature_entity) not in ['unknown', 'unavailable', none] }} setpoint_change_source_entity_valid: > {{ setpoint_change_source_entity and states(setpoint_change_source_entity) not in ['unknown', 'unavailable', none] }} + window_detection_entity_valid: > + {{ window_detection_entity and window_detection_entity | length > 0 }} current_remote_temperature: > {{ states(remote_temperature_entity) | float(0) if remote_temperature_entity_valid else 0 }} remote_temperature_last_change: > @@ -270,10 +272,12 @@ variables: (override_reset_duration.seconds | default(0) | int) if override_reset_duration is mapping else 0 }} override_last_change: > {{ states[setpoint_change_source_entity].last_updated if setpoint_change_source_entity_valid else none }} + is_setpoint_manual: > + {{ setpoint_change_source_entity_valid and states(setpoint_change_source_entity) == 'manual' }} override_duration_exceeded: > {% if override_last_change == none or override_reset_duration_seconds == 0 %} false - {% elif not setpoint_change_source_entity_valid or states(setpoint_change_source_entity) != 'manual' %} + {% elif not is_setpoint_manual %} false {% else %} {% set last_change = as_datetime(override_last_change) %}