some more fixes
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user