some more fixes

This commit is contained in:
2025-11-24 18:28:05 +01:00
parent 8d50424d91
commit 2b6c5b29d9

View File

@@ -54,14 +54,14 @@ blueprint:
triggers: triggers:
- trigger: state - trigger: state
entity_id: entity_id:
- binary_sensor.buro_pierre_fenster - !input window_sensor
from: "off" from: "off"
to: "on" to: "on"
for: !input window_delay_open for: !input window_delay_open
id: FENSTER_OPEN id: FENSTER_OPEN
- trigger: state - trigger: state
entity_id: entity_id:
- binary_sensor.buro_pierre_fenster - !input window_sensor
from: "on" from: "on"
to: "off" to: "off"
for: !input window_delay_close for: !input window_delay_close
@@ -72,25 +72,25 @@ blueprint:
variables: variables:
trv: !input radiator_entity trv: !input radiator_entity
remote_temperature_entity: > remote_temperature_entity: >
{% set entities = device_entities(device_id(trv)) %} {% set entities = device_entities(device_id(trv)) %}
{% set remote_temperature_entity_id = namespace(id=[]) %} {% set remote_temperature_entity_id = namespace(id='') %}
{% for s in entities %} {% for s in entities %}
{% if ('remote_temperature' in s) %} {% if 'remote_temperature' in s %}
{% set remote_temperature_entity_id.id = s %} {% set remote_temperature_entity_id.id = s %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{{ iif (remote_temperature_entity_id.id[0] is defined, remote_temperature_entity_id.id, '') }} {{ remote_temperature_entity_id.id }}
window_detection_entity: > window_detection_entity: >
{% set entities = device_entities(device_id(trv)) %} {% set entities = device_entities(device_id(trv)) %}
{% set window_detection_entity_id = namespace(id=[]) %} {% set window_detection_entity_id = namespace(id='') %}
{% for s in entities %} {% for s in entities %}
{% if ('window_detection' in s) %} {% if 'window_detection' in s %}
{% set window_detection_entity_id.id = s %} {% set window_detection_entity_id.id = s %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{{ iif (window_detection_entity_id.id[0] is defined, window_detection_entity_id.id, '') }} {{ window_detection_entity_id.id }}
current_temperature: !input temperature_sensor current_temperature: !input temperature_sensor
actions: actions:
- if: - if:
@@ -98,20 +98,18 @@ blueprint:
id: id:
- FENSTER_OPEN - FENSTER_OPEN
then: then:
- type: turn_on - service: switch.turn_on
device_id: !input radiator_entity target:
entity_id: !input window_detection_entity entity_id: "{{ window_detection_entity }}"
domain: switch
alias: Setze Fenster auf offen alias: Setze Fenster auf offen
- if: - if:
- condition: trigger - condition: trigger
id: id:
- FENSTER_CLOSED - FENSTER_CLOSED
then: then:
- type: turn_off - service: switch.turn_off
device_id: !input radiator_entity target:
entity_id: !input window_detection_entity entity_id: "{{ window_detection_entity }}"
domain: switch
alias: Setze Fenster auf geschlossen alias: Setze Fenster auf geschlossen
# temperature sensor sync # temperature sensor sync
- if: - if: