From 55dff75ce5fd97ade3544c180958e86630a10afb Mon Sep 17 00:00:00 2001 From: Pierre Eisenbrandt Date: Mon, 22 Dec 2025 19:42:26 +0100 Subject: [PATCH] use current target temp as reference --- Climate/bosch_bth-ra_control.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Climate/bosch_bth-ra_control.yaml b/Climate/bosch_bth-ra_control.yaml index 79b1d34..74e2454 100644 --- a/Climate/bosch_bth-ra_control.yaml +++ b/Climate/bosch_bth-ra_control.yaml @@ -227,13 +227,13 @@ variables: is_sensor_sync_needed: > {% set current_remote_temp = states(remote_temperature_entity) | float(0) %} {% set new_sensor_temp = states(temperature_sensor) | float(0) %} - {% set target = safe_temperature | float(0) %} + {% set target_temp = state_attr(trv, 'temperature') | float(0) %} {% set diff = (new_sensor_temp - current_remote_temp) | abs %} {% if diff >= 0.5 %} true - {% elif new_sensor_temp < target and current_remote_temp >= target %} + {% elif new_sensor_temp < target_temp and current_remote_temp >= target_temp %} true - {% elif new_sensor_temp > target and current_remote_temp <= target %} + {% elif new_sensor_temp > target_temp and current_remote_temp <= target_temp %} true {% else %} false