blueprint.yaml aktualisiert
This commit is contained in:
parent
4579b7fc09
commit
9b7966dd1c
1 changed files with 51 additions and 127 deletions
178
blueprint.yaml
178
blueprint.yaml
|
|
@ -1,175 +1,99 @@
|
||||||
blueprint:
|
alias: Klima BT Wohnzimmer
|
||||||
name: Better Thermostat Controller (Window + Deadzone Fix)
|
description: "Steuerung mit Fenster-Logik, Sommer/Winter und Zeitplan"
|
||||||
description: Steuert BT. Logik: Fenster offen > Sommer (Aus) > Urlaub (Eco) > Winter+Schedule (Komfort) > SONST IMMER ECO.
|
mode: restart
|
||||||
domain: automation
|
max: 10
|
||||||
input:
|
triggers:
|
||||||
better_thermostat_entity:
|
|
||||||
name: Better Thermostat Entity
|
|
||||||
description: Die BT Entität (muss Fenstersensoren in BT konfiguriert haben!)
|
|
||||||
selector:
|
|
||||||
entity:
|
|
||||||
domain: climate
|
|
||||||
integration: better_thermostat
|
|
||||||
schedule_entity:
|
|
||||||
name: Heizzeitplan Schedule
|
|
||||||
selector:
|
|
||||||
entity:
|
|
||||||
domain: schedule
|
|
||||||
vacation_helper:
|
|
||||||
name: Urlaubsmodus Helper
|
|
||||||
selector:
|
|
||||||
entity:
|
|
||||||
domain: input_boolean
|
|
||||||
weather_entity:
|
|
||||||
name: Wettervorhersage
|
|
||||||
selector:
|
|
||||||
entity:
|
|
||||||
domain: weather
|
|
||||||
summer_temp_threshold:
|
|
||||||
name: Sommer-Schwellwert (°C)
|
|
||||||
description: Ab hier wird die Heizung komplett ausgeschaltet.
|
|
||||||
default: 22
|
|
||||||
selector:
|
|
||||||
number:
|
|
||||||
min: 15
|
|
||||||
max: 30
|
|
||||||
step: 1
|
|
||||||
winter_temp_threshold:
|
|
||||||
name: Winter-Schwellwert (°C)
|
|
||||||
description: Unter dieser Temp wird der Komfort-Modus erlaubt (wenn Schedule an ist).
|
|
||||||
default: 18
|
|
||||||
selector:
|
|
||||||
number:
|
|
||||||
min: 10
|
|
||||||
max: 25
|
|
||||||
step: 1
|
|
||||||
eco_temp:
|
|
||||||
name: Eco Temperatur (°C)
|
|
||||||
description: Standard-Temperatur (Übergangszeit, Nachts, Abwesend)
|
|
||||||
default: 17
|
|
||||||
selector:
|
|
||||||
number:
|
|
||||||
min: 10
|
|
||||||
max: 20
|
|
||||||
step: 0.5
|
|
||||||
comfort_temp:
|
|
||||||
name: Komfort Temperatur (°C)
|
|
||||||
description: Temperatur wenn es kalt ist UND Schedule aktiv ist.
|
|
||||||
default: 21
|
|
||||||
selector:
|
|
||||||
number:
|
|
||||||
min: 18
|
|
||||||
max: 24
|
|
||||||
step: 0.5
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: !input schedule_entity
|
entity_id: schedule.heizzeitplan_wohnzimmer
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: !input vacation_helper
|
entity_id: input_boolean.urlaubsmodus_heizunh # Prüfe, ob "heizunh" wirklich stimmt!
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: !input weather_entity
|
entity_id: weather.schleswig
|
||||||
attribute: temperature
|
attribute: temperature
|
||||||
- platform: time_pattern
|
- platform: time_pattern
|
||||||
minutes: "/30"
|
minutes: /30
|
||||||
# Sofort reagieren, wenn Fenster zugeht
|
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: !input better_thermostat_entity
|
entity_id: climate.klima_bt_wohnzimmer
|
||||||
attribute: window_open
|
attribute: window_open
|
||||||
|
actions:
|
||||||
condition: []
|
|
||||||
|
|
||||||
action:
|
|
||||||
- variables:
|
- variables:
|
||||||
bt_entity: !input better_thermostat_entity
|
bt_entity: climate.klima_bt_wohnzimmer
|
||||||
weather_entity: !input weather_entity
|
weather_entity: weather.schleswig
|
||||||
schedule_entity: !input schedule_entity
|
schedule_entity: schedule.heizzeitplan_wohnzimmer
|
||||||
vacation_entity: !input vacation_helper
|
vacation_entity: input_boolean.urlaubsmodus_heizunh
|
||||||
summer_threshold: !input summer_temp_threshold
|
summer_threshold: 18
|
||||||
winter_threshold: !input winter_temp_threshold
|
winter_threshold: 18
|
||||||
eco_temperature: !input eco_temp
|
eco_temperature: 18
|
||||||
comfort_temperature: !input comfort_temp
|
comfort_temperature: 20.5
|
||||||
|
|
||||||
- variables:
|
- variables:
|
||||||
weather_temp: '{{ state_attr(weather_entity, "temperature") | float(15) }}'
|
weather_temp: "{{ state_attr(weather_entity, 'temperature') | float(15) }}"
|
||||||
is_window_open: '{{ state_attr(bt_entity, "window_open") | bool(false) }}'
|
is_window_open: "{{ state_attr(bt_entity, 'window_open') | bool(false) }}"
|
||||||
|
|
||||||
# Logik-Definitionen
|
|
||||||
is_summer: "{{ weather_temp > summer_threshold }}"
|
is_summer: "{{ weather_temp > summer_threshold }}"
|
||||||
is_winter_mode: "{{ weather_temp < winter_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' }}"
|
is_vacation: "{{ states(vacation_entity) == 'on' }}"
|
||||||
schedule_active: "{{ states(schedule_entity) == 'on' }}"
|
schedule_active: "{{ states(schedule_entity) == 'on' }}"
|
||||||
|
|
||||||
- choose:
|
- choose:
|
||||||
# 0. NOTBREMSE: Fenster offen
|
# 1. FENSTER OFFEN -> STOP
|
||||||
# Wenn Fenster offen, brechen wir ab. BT regelt das "Aus".
|
|
||||||
# Wir verhindern nur, dass die Automation die Heizung wieder anmacht.
|
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ is_window_open }}"
|
value_template: "{{ is_window_open }}"
|
||||||
sequence:
|
sequence:
|
||||||
- stop: "Fenster offen - Automation übergibt an Better Thermostat."
|
- stop: "Fenster ist offen - Automation bricht ab und lässt BT die Kontrolle."
|
||||||
|
|
||||||
# 1. SOMMER: Heizung ganz aus
|
# 2. SOMMER -> AUS
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ is_summer }}"
|
value_template: "{{ is_summer }}"
|
||||||
sequence:
|
sequence:
|
||||||
- service: climate.set_hvac_mode
|
- action: climate.set_hvac_mode
|
||||||
target:
|
target:
|
||||||
entity_id: !input better_thermostat_entity
|
entity_id: climate.klima_bt_wohnzimmer
|
||||||
data:
|
data:
|
||||||
hvac_mode: "off"
|
hvac_mode: "off"
|
||||||
|
|
||||||
# 2. URLAUB: Immer Eco
|
# 3. URLAUB -> ECO
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ is_vacation }}"
|
value_template: "{{ is_vacation }}"
|
||||||
sequence:
|
sequence:
|
||||||
- service: climate.set_hvac_mode
|
- action: climate.set_hvac_mode
|
||||||
target:
|
target:
|
||||||
entity_id: !input better_thermostat_entity
|
entity_id: climate.klima_bt_wohnzimmer
|
||||||
data:
|
data:
|
||||||
hvac_mode: "heat"
|
hvac_mode: heat
|
||||||
- service: climate.set_temperature
|
- action: climate.set_temperature
|
||||||
target:
|
target:
|
||||||
entity_id: !input better_thermostat_entity
|
entity_id: climate.klima_bt_wohnzimmer
|
||||||
data:
|
data:
|
||||||
temperature: "{{ eco_temperature }}"
|
temperature: "{{ eco_temperature }}"
|
||||||
|
|
||||||
# 3. WINTER & ZEITPLAN: Komfort
|
# 4. WINTER + SCHEDULE -> KOMFORT
|
||||||
# Nur wenn es wirklich kalt ist (unter Winter-Schwelle) UND der Zeitplan an ist
|
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ is_winter_mode and schedule_active }}"
|
value_template: "{{ is_heating_season and schedule_active }}"
|
||||||
sequence:
|
sequence:
|
||||||
- service: climate.set_hvac_mode
|
- action: climate.set_hvac_mode
|
||||||
target:
|
target:
|
||||||
entity_id: !input better_thermostat_entity
|
entity_id: climate.klima_bt_wohnzimmer
|
||||||
data:
|
data:
|
||||||
hvac_mode: "heat"
|
hvac_mode: heat
|
||||||
- service: climate.set_temperature
|
- action: climate.set_temperature
|
||||||
target:
|
target:
|
||||||
entity_id: !input better_thermostat_entity
|
entity_id: climate.klima_bt_wohnzimmer
|
||||||
data:
|
data:
|
||||||
temperature: "{{ comfort_temperature }}"
|
temperature: "{{ comfort_temperature }}"
|
||||||
|
|
||||||
# 4. DEFAULT / FALLBACK (Die ehemalige Todeszone + Nachts)
|
# 5. DEFAULT (Alles andere: Winter ohne Schedule, genau 18 Grad, etc.) -> ECO
|
||||||
# Wenn KEINE der oberen Bedingungen zutrifft (also weder Sommer, noch Urlaub, noch Kalter-Komfort),
|
|
||||||
# dann greift dieser Block. Das deckt ab:
|
|
||||||
# - Winter + Nachts (Schedule aus)
|
|
||||||
# - Übergangszeit (Todeszone) egal ob Schedule an oder aus
|
|
||||||
default:
|
default:
|
||||||
- service: climate.set_hvac_mode
|
- action: climate.set_hvac_mode
|
||||||
target:
|
target:
|
||||||
entity_id: !input better_thermostat_entity
|
entity_id: climate.klima_bt_wohnzimmer
|
||||||
data:
|
data:
|
||||||
hvac_mode: "heat"
|
hvac_mode: heat
|
||||||
- service: climate.set_temperature
|
- action: climate.set_temperature
|
||||||
target:
|
target:
|
||||||
entity_id: !input better_thermostat_entity
|
entity_id: climate.klima_bt_wohnzimmer
|
||||||
data:
|
data:
|
||||||
temperature: "{{ eco_temperature }}"
|
temperature: "{{ eco_temperature }}"
|
||||||
|
|
||||||
mode: restart
|
|
||||||
max: 10
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue