add heating period switch
This commit is contained in:
@@ -24,6 +24,15 @@ blueprint:
|
||||
filter:
|
||||
- domain: sensor
|
||||
device_class: temperature
|
||||
heating_period_switch:
|
||||
name: Heizperiode Switch
|
||||
description: Optional - Switch der angibt ob Heizperiode aktiv ist. Wenn nicht gesetzt, ist die Heizperiode immer aktiv.
|
||||
default: null
|
||||
selector:
|
||||
entity:
|
||||
multiple: false
|
||||
filter:
|
||||
- domain: switch
|
||||
window_section:
|
||||
name: Fenster-/Türsensor Konfiguration
|
||||
description: Konfiguration für den Fenster-/Türsensor.
|
||||
@@ -101,9 +110,16 @@ blueprint:
|
||||
variables:
|
||||
trv: !input trv
|
||||
temperature_sensor: !input temperature_sensor
|
||||
heating_period_switch: !input heating_period_switch
|
||||
radiator_schedules: !input radiator_schedules
|
||||
away_temperature: !input away_temperature
|
||||
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: >
|
||||
{% set entities = device_entities(device_id(trv)) %}
|
||||
{% set remote_temperature_entity_id = namespace(id='') %}
|
||||
@@ -178,8 +194,22 @@ triggers:
|
||||
from: "armed_away"
|
||||
to: "disarmed"
|
||||
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:
|
||||
- choose:
|
||||
# Alle bestehenden Aktionen nur ausführen wenn Heizperiode aktiv ist
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: "{{ is_heating_period }}"
|
||||
sequence:
|
||||
# setze Fenster auf offen/geschlossen
|
||||
- choose:
|
||||
- conditions:
|
||||
@@ -271,3 +301,58 @@ actions:
|
||||
temperature: "{{ target_temperature | float }}"
|
||||
alias: Setze Solltemperatur basierend auf Alarm-Status
|
||||
alias: Solltemperatur setzen
|
||||
alias: Aktionen während Heizperiode
|
||||
# Heizperiode Switch Aktionen
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id:
|
||||
- HEATING_PERIOD_ON
|
||||
- HEATING_PERIOD_OFF
|
||||
sequence:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
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
|
||||
alias: Hauptsteuerung
|
||||
Reference in New Issue
Block a user