Compare commits

..

7 Commits

View File

@@ -24,6 +24,14 @@ blueprint:
filter: filter:
- domain: sensor - domain: sensor
device_class: temperature device_class: temperature
heating_period_switch:
name: Heizperiode Switch
description: Optional - Input Boolean der angibt ob Heizperiode aktiv ist. Wenn nicht gesetzt, ist die Heizperiode immer aktiv.
selector:
entity:
multiple: false
filter:
- domain: input_boolean
window_section: window_section:
name: Fenster-/Türsensor Konfiguration name: Fenster-/Türsensor Konfiguration
description: Konfiguration für den Fenster-/Türsensor. description: Konfiguration für den Fenster-/Türsensor.
@@ -80,7 +88,6 @@ blueprint:
alarm_control_panel: alarm_control_panel:
name: Alarm Control Panel name: Alarm Control Panel
description: Optional - Alarm Control Panel um Heizung abzusenken, wenn Alarm im Abwesendmodus ist description: Optional - Alarm Control Panel um Heizung abzusenken, wenn Alarm im Abwesendmodus ist
default: null
selector: selector:
entity: entity:
multiple: false multiple: false
@@ -101,9 +108,16 @@ blueprint:
variables: variables:
trv: !input trv trv: !input trv
temperature_sensor: !input temperature_sensor temperature_sensor: !input temperature_sensor
heating_period_switch: !input heating_period_switch
radiator_schedules: !input radiator_schedules radiator_schedules: !input radiator_schedules
away_temperature: !input away_temperature away_temperature: !input away_temperature
alarm_control_panel: !input alarm_control_panel alarm_control_panel: !input alarm_control_panel
is_heating_period: >
{% if heating_period_switch is none or heating_period_switch == '' %}
true
{% else %}
{{ is_state(heating_period_switch, 'on') }}
{% endif %}
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='') %}
@@ -163,8 +177,8 @@ triggers:
for: !input window_delay_close for: !input window_delay_close
id: FENSTER_CLOSED id: FENSTER_CLOSED
- platform: time_pattern - platform: time_pattern
# Synce Temperatur alle 20 Minuten (Teiler von 60) # Synce Temperatur alle 5 Minuten (Teiler von 60)
minutes: "/20" minutes: "/5"
id: SYNC_TEMPERATURE id: SYNC_TEMPERATURE
- platform: state - platform: state
entity_id: !input temperature_sensor entity_id: !input temperature_sensor
@@ -178,96 +192,165 @@ triggers:
from: "armed_away" from: "armed_away"
to: "disarmed" to: "disarmed"
id: ALARM_DISARMED_AWAY id: ALARM_DISARMED_AWAY
- platform: state
entity_id: !input heating_period_switch
to: "on"
id: HEATING_PERIOD_ON
- platform: state
entity_id: !input heating_period_switch
to: "off"
id: HEATING_PERIOD_OFF
actions: actions:
# setze Fenster auf offen/geschlossen
- choose: - choose:
# Heizperiode Switch Aktionen
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- FENSTER_OPEN - HEATING_PERIOD_ON
- condition: template - HEATING_PERIOD_OFF
value_template: >
{{ is_state(window_detection_entity, 'off') }}
sequence: sequence:
- service: switch.turn_on - choose:
target: - conditions:
entity_id: "{{ window_detection_entity }}" - condition: trigger
alias: Setze Fenster auf offen id:
- HEATING_PERIOD_ON
sequence:
- service: climate.set_hvac_mode
target:
entity_id: !input trv
data:
hvac_mode: "heat"
- if:
- condition: state
entity_id: !input window_sensor
state: "on"
then:
- service: switch.turn_on
target:
entity_id: "{{ window_detection_entity }}"
- if:
- condition: template
value_template: >
{{ target_temperature is not none and target_temperature | is_number }}
then:
- service: climate.set_temperature
target:
entity_id: !input trv
data:
temperature: "{{ target_temperature | float }}"
alias: Heizperiode aktiviert - Setze Modus auf heat, synchronisiere Fensterstatus und Solltemperatur
- conditions:
- condition: trigger
id:
- HEATING_PERIOD_OFF
sequence:
- service: switch.turn_off
target:
entity_id: "{{ window_detection_entity }}"
- service: climate.set_hvac_mode
target:
entity_id: !input trv
data:
hvac_mode: "off"
alias: Heizperiode deaktiviert - Setze Fenster geschlossen und Modus auf off
alias: Heizperiode Switch Änderung
alias: Heizperiode Switch Aktionen
# Alle bestehenden Aktionen nur ausführen wenn Heizperiode aktiv ist
- conditions: - conditions:
- condition: trigger
id:
- FENSTER_CLOSED
- condition: template - condition: template
value_template: > value_template: "{{ is_heating_period }}"
{{ is_state(window_detection_entity, 'on') }}
sequence: sequence:
- service: switch.turn_off # setze Fenster auf offen/geschlossen
target: - choose:
entity_id: "{{ window_detection_entity }}" - conditions:
- if: - condition: trigger
id:
- FENSTER_OPEN
- condition: template - condition: template
value_template: > value_template: >
{{ target_temperature is not none and target_temperature | is_number }} {{ is_state(window_detection_entity, 'off') }}
then: sequence:
- service: climate.set_temperature - service: switch.turn_on
target: target:
entity_id: !input trv entity_id: "{{ window_detection_entity }}"
data: alias: Setze Fenster auf offen
temperature: "{{ target_temperature | float }}" - conditions:
alias: Setze Fenster auf geschlossen und setze Solltemperatur auf Wert aus Zeitplan (wenn vorhanden) - condition: trigger
alias: Fensterstatus Änderung id:
# temperature sensor sync - FENSTER_CLOSED
- choose:
- conditions:
- condition: trigger
id:
- TEMP_CHANGED
- condition: template
value_template: >
{{ temperature_sensor is defined and states(temperature_sensor) | is_number }}
sequence:
- service: number.set_value
data:
value: "{{ states(temperature_sensor) | float }}"
target:
entity_id: "{{ remote_temperature_entity }}"
alias: Synchronisiere Temperatur am TRV (bei Änderung)
- conditions:
- condition: trigger
id:
- SYNC_TEMPERATURE
- condition: template
value_template: >
{{ temperature_sensor is defined and states(temperature_sensor) | is_number }}
- condition: template
value_template: >
{{ (now() - states[temperature_sensor].last_changed).total_seconds() > 1199 }}
sequence:
- service: number.set_value
data:
value: "{{ states(temperature_sensor) | float }}"
target:
entity_id: "{{ remote_temperature_entity }}"
alias: Synchronisiere Temperatur am TRV (zeitbasiert, wenn länger als 20min unverändert)
alias: Temperatursynchronisation
# setze Solltemperatur basierend auf Alarm-Status
- choose:
- conditions:
- condition: trigger
id:
- ALARM_ARMED_AWAY
- ALARM_DISARMED_AWAY
sequence:
- if:
- condition: template - condition: template
value_template: > value_template: >
{{ target_temperature is not none and target_temperature | is_number }} {{ is_state(window_detection_entity, 'on') }}
then: sequence:
- service: climate.set_temperature - service: switch.turn_off
target: target:
entity_id: !input trv entity_id: "{{ window_detection_entity }}"
data: - if:
temperature: "{{ target_temperature | float }}" - condition: template
alias: Setze Solltemperatur basierend auf Alarm-Status value_template: >
alias: Solltemperatur setzen {{ target_temperature is not none and target_temperature | is_number }}
then:
- service: climate.set_temperature
target:
entity_id: !input trv
data:
temperature: "{{ target_temperature | float }}"
alias: Setze Fenster auf geschlossen und setze Solltemperatur auf Wert aus Zeitplan (wenn vorhanden)
alias: Fensterstatus Änderung
# temperature sensor sync
- choose:
- conditions:
- condition: trigger
id:
- TEMP_CHANGED
- condition: template
value_template: >
{{ temperature_sensor is defined and states(temperature_sensor) | is_number }}
sequence:
- service: number.set_value
data:
value: "{{ states(temperature_sensor) | float }}"
target:
entity_id: "{{ remote_temperature_entity }}"
alias: Synchronisiere Temperatur am TRV (bei Änderung)
- conditions:
- condition: trigger
id:
- SYNC_TEMPERATURE
- condition: template
value_template: >
{{ temperature_sensor is defined and states(temperature_sensor) | is_number }}
- condition: template
value_template: >
{{ (now() - states[temperature_sensor].last_changed).total_seconds() > 1199 }}
sequence:
- service: number.set_value
data:
value: "{{ states(temperature_sensor) | float }}"
target:
entity_id: "{{ remote_temperature_entity }}"
alias: Synchronisiere Temperatur am TRV (zeitbasiert, wenn länger als 20min unverändert)
alias: Temperatursynchronisation
# setze Solltemperatur basierend auf Alarm-Status
- choose:
- conditions:
- condition: trigger
id:
- ALARM_ARMED_AWAY
- ALARM_DISARMED_AWAY
sequence:
- if:
- condition: template
value_template: >
{{ target_temperature is not none and target_temperature | is_number }}
then:
- service: climate.set_temperature
target:
entity_id: !input trv
data:
temperature: "{{ target_temperature | float }}"
alias: Setze Solltemperatur basierend auf Alarm-Status
alias: Solltemperatur setzen
alias: Aktionen während Heizperiode
alias: Hauptsteuerung