From 2b6c5b29d91d649868122f4c853ffe54ecb88892 Mon Sep 17 00:00:00 2001 From: Pierre Eisenbrandt Date: Mon, 24 Nov 2025 18:28:05 +0100 Subject: [PATCH] some more fixes --- Climate/bosch_bth-ra_control.yaml | 56 +++++++++++++++---------------- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/Climate/bosch_bth-ra_control.yaml b/Climate/bosch_bth-ra_control.yaml index 63a6eb2..0f82a31 100644 --- a/Climate/bosch_bth-ra_control.yaml +++ b/Climate/bosch_bth-ra_control.yaml @@ -54,14 +54,14 @@ blueprint: triggers: - trigger: state entity_id: - - binary_sensor.buro_pierre_fenster + - !input window_sensor from: "off" to: "on" for: !input window_delay_open id: FENSTER_OPEN - trigger: state entity_id: - - binary_sensor.buro_pierre_fenster + - !input window_sensor from: "on" to: "off" for: !input window_delay_close @@ -72,25 +72,25 @@ blueprint: variables: trv: !input radiator_entity - remote_temperature_entity: > - {% set entities = device_entities(device_id(trv)) %} - {% set remote_temperature_entity_id = namespace(id=[]) %} - {% for s in entities %} - {% if ('remote_temperature' in s) %} - {% set remote_temperature_entity_id.id = s %} - {% endif %} - {% endfor %} - {{ iif (remote_temperature_entity_id.id[0] is defined, remote_temperature_entity_id.id, '') }} - window_detection_entity: > - {% set entities = device_entities(device_id(trv)) %} - {% set window_detection_entity_id = namespace(id=[]) %} - {% for s in entities %} - {% if ('window_detection' in s) %} - {% set window_detection_entity_id.id = s %} - {% endif %} - {% endfor %} - {{ iif (window_detection_entity_id.id[0] is defined, window_detection_entity_id.id, '') }} - current_temperature: !input temperature_sensor + remote_temperature_entity: > + {% set entities = device_entities(device_id(trv)) %} + {% set remote_temperature_entity_id = namespace(id='') %} + {% for s in entities %} + {% if 'remote_temperature' in s %} + {% set remote_temperature_entity_id.id = s %} + {% endif %} + {% endfor %} + {{ remote_temperature_entity_id.id }} + window_detection_entity: > + {% set entities = device_entities(device_id(trv)) %} + {% set window_detection_entity_id = namespace(id='') %} + {% for s in entities %} + {% if 'window_detection' in s %} + {% set window_detection_entity_id.id = s %} + {% endif %} + {% endfor %} + {{ window_detection_entity_id.id }} + current_temperature: !input temperature_sensor actions: - if: @@ -98,20 +98,18 @@ blueprint: id: - FENSTER_OPEN then: - - type: turn_on - device_id: !input radiator_entity - entity_id: !input window_detection_entity - domain: switch + - service: switch.turn_on + target: + entity_id: "{{ window_detection_entity }}" alias: Setze Fenster auf offen - if: - condition: trigger id: - FENSTER_CLOSED then: - - type: turn_off - device_id: !input radiator_entity - entity_id: !input window_detection_entity - domain: switch + - service: switch.turn_off + target: + entity_id: "{{ window_detection_entity }}" alias: Setze Fenster auf geschlossen # temperature sensor sync - if: