diff --git a/Climate/bosch_bth-ra_control.yaml b/Climate/bosch_bth-ra_control.yaml index 232efb1..1178f3b 100644 --- a/Climate/bosch_bth-ra_control.yaml +++ b/Climate/bosch_bth-ra_control.yaml @@ -211,11 +211,17 @@ variables: {% endfor %} {{ remote_temperature_entity_id.id }} current_remote_temperature: > - {% if remote_temperature_entity and remote_temperature_entity in states %} + {% if remote_temperature_entity and states(remote_temperature_entity) not in ['unknown', 'unavailable', none]%} {{ states(remote_temperature_entity) | float(0) }} {% else %} {{ 0 }} {% endif %} + remote_temperature_last_change: > + {% if remote_temperature_entity and states(remote_temperature_entity) not in ['unknown', 'unavailable', none] %} + {{ states[remote_temperature_entity].last_changed }} + {% else %} + {{ none }} + {% endif %} window_detection_entity: > {% set entities = device_entities(device_id(trv)) %} {% set window_detection_entity_id = namespace(id='') %} @@ -315,17 +321,11 @@ variables: 0 {% endif %} override_last_change: > - {% if setpoint_change_source_entity and setpoint_change_source_entity in states %} + {% if setpoint_change_source_entity and states(setpoint_change_source_entity) not in ['unknown', 'unavailable', none] %} {{ states[setpoint_change_source_entity].last_updated }} {% else %} {{ none }} {% endif %} - remote_temperature_last_change: > - {% if remote_temperature_entity and remote_temperature_entity in states %} - {{ states[remote_temperature_entity].last_changed }} - {% else %} - {{ none }} - {% endif %} override_duration_exceeded: > {% if override_last_change and override_reset_duration_seconds > 0 and setpoint_change_source_entity and states(setpoint_change_source_entity) == 'manual' %} {% set elapsed = (now() - override_last_change).total_seconds() %}