99 lines
No EOL
3.3 KiB
YAML
99 lines
No EOL
3.3 KiB
YAML
alias: Klima BT Wohnzimmer
|
|
description: "Steuerung mit Fenster-Logik, Sommer/Winter und Zeitplan"
|
|
mode: restart
|
|
max: 10
|
|
triggers:
|
|
- platform: state
|
|
entity_id: schedule.heizzeitplan_wohnzimmer
|
|
- platform: state
|
|
entity_id: input_boolean.urlaubsmodus_heizunh # Prüfe, ob "heizunh" wirklich stimmt!
|
|
- platform: state
|
|
entity_id: weather.schleswig
|
|
attribute: temperature
|
|
- platform: time_pattern
|
|
minutes: /30
|
|
- platform: state
|
|
entity_id: climate.klima_bt_wohnzimmer
|
|
attribute: window_open
|
|
actions:
|
|
- variables:
|
|
bt_entity: climate.klima_bt_wohnzimmer
|
|
weather_entity: weather.schleswig
|
|
schedule_entity: schedule.heizzeitplan_wohnzimmer
|
|
vacation_entity: input_boolean.urlaubsmodus_heizunh
|
|
summer_threshold: 18
|
|
winter_threshold: 18
|
|
eco_temperature: 18
|
|
comfort_temperature: 20.5
|
|
- variables:
|
|
weather_temp: "{{ state_attr(weather_entity, 'temperature') | float(15) }}"
|
|
is_window_open: "{{ state_attr(bt_entity, 'window_open') | bool(false) }}"
|
|
is_summer: "{{ weather_temp > summer_threshold }}"
|
|
# Winter-Definition hier für die Variable, aber im Choose nutzen wir den Default
|
|
is_heating_season: "{{ weather_temp < winter_threshold }}"
|
|
is_vacation: "{{ states(vacation_entity) == 'on' }}"
|
|
schedule_active: "{{ states(schedule_entity) == 'on' }}"
|
|
|
|
- choose:
|
|
# 1. FENSTER OFFEN -> STOP
|
|
- conditions:
|
|
- condition: template
|
|
value_template: "{{ is_window_open }}"
|
|
sequence:
|
|
- stop: "Fenster ist offen - Automation bricht ab und lässt BT die Kontrolle."
|
|
|
|
# 2. SOMMER -> AUS
|
|
- conditions:
|
|
- condition: template
|
|
value_template: "{{ is_summer }}"
|
|
sequence:
|
|
- action: climate.set_hvac_mode
|
|
target:
|
|
entity_id: climate.klima_bt_wohnzimmer
|
|
data:
|
|
hvac_mode: "off"
|
|
|
|
# 3. URLAUB -> ECO
|
|
- conditions:
|
|
- condition: template
|
|
value_template: "{{ is_vacation }}"
|
|
sequence:
|
|
- action: climate.set_hvac_mode
|
|
target:
|
|
entity_id: climate.klima_bt_wohnzimmer
|
|
data:
|
|
hvac_mode: heat
|
|
- action: climate.set_temperature
|
|
target:
|
|
entity_id: climate.klima_bt_wohnzimmer
|
|
data:
|
|
temperature: "{{ eco_temperature }}"
|
|
|
|
# 4. WINTER + SCHEDULE -> KOMFORT
|
|
- conditions:
|
|
- condition: template
|
|
value_template: "{{ is_heating_season and schedule_active }}"
|
|
sequence:
|
|
- action: climate.set_hvac_mode
|
|
target:
|
|
entity_id: climate.klima_bt_wohnzimmer
|
|
data:
|
|
hvac_mode: heat
|
|
- action: climate.set_temperature
|
|
target:
|
|
entity_id: climate.klima_bt_wohnzimmer
|
|
data:
|
|
temperature: "{{ comfort_temperature }}"
|
|
|
|
# 5. DEFAULT (Alles andere: Winter ohne Schedule, genau 18 Grad, etc.) -> ECO
|
|
default:
|
|
- action: climate.set_hvac_mode
|
|
target:
|
|
entity_id: climate.klima_bt_wohnzimmer
|
|
data:
|
|
hvac_mode: heat
|
|
- action: climate.set_temperature
|
|
target:
|
|
entity_id: climate.klima_bt_wohnzimmer
|
|
data:
|
|
temperature: "{{ eco_temperature }}" |