blueprint.yaml aktualisiert

This commit is contained in:
nocci 2026-01-16 11:19:31 +01:00
parent b22e7e9ba6
commit 4579b7fc09

View file

@ -1,6 +1,6 @@
blueprint: blueprint:
name: Better Thermostat Multi-Mode Controller (Window Aware) name: Better Thermostat Controller (Window + Deadzone Fix)
description: Steuert Better Thermostat mit Fenster-Check, Sommer/Winter, Schedule und Urlaub. description: Steuert BT. Logik: Fenster offen > Sommer (Aus) > Urlaub (Eco) > Winter+Schedule (Komfort) > SONST IMMER ECO.
domain: automation domain: automation
input: input:
better_thermostat_entity: better_thermostat_entity:
@ -27,6 +27,7 @@ blueprint:
domain: weather domain: weather
summer_temp_threshold: summer_temp_threshold:
name: Sommer-Schwellwert (°C) name: Sommer-Schwellwert (°C)
description: Ab hier wird die Heizung komplett ausgeschaltet.
default: 22 default: 22
selector: selector:
number: number:
@ -35,7 +36,7 @@ blueprint:
step: 1 step: 1
winter_temp_threshold: winter_temp_threshold:
name: Winter-Schwellwert (°C) name: Winter-Schwellwert (°C)
description: Unter dieser Temp wird geheizt. description: Unter dieser Temp wird der Komfort-Modus erlaubt (wenn Schedule an ist).
default: 18 default: 18
selector: selector:
number: number:
@ -44,14 +45,16 @@ blueprint:
step: 1 step: 1
eco_temp: eco_temp:
name: Eco Temperatur (°C) name: Eco Temperatur (°C)
default: 16 description: Standard-Temperatur (Übergangszeit, Nachts, Abwesend)
default: 17
selector: selector:
number: number:
min: 10 min: 10
max: 18 max: 20
step: 0.5 step: 0.5
comfort_temp: comfort_temp:
name: Komfort Temperatur (°C) name: Komfort Temperatur (°C)
description: Temperatur wenn es kalt ist UND Schedule aktiv ist.
default: 21 default: 21
selector: selector:
number: number:
@ -66,10 +69,10 @@ trigger:
entity_id: !input vacation_helper entity_id: !input vacation_helper
- platform: state - platform: state
entity_id: !input weather_entity entity_id: !input weather_entity
attribute: temperature # Nur triggern, wenn sich die Temperatur ändert, nicht bei jedem Wetter-Update attribute: temperature
- platform: time_pattern - platform: time_pattern
minutes: "/30" minutes: "/30"
# Wir triggern auch, wenn BT sich ändert (z.B. Fenster geht zu), um sofort wieder zu heizen # Sofort reagieren, wenn Fenster zugeht
- platform: state - platform: state
entity_id: !input better_thermostat_entity entity_id: !input better_thermostat_entity
attribute: window_open attribute: window_open
@ -89,24 +92,25 @@ action:
- variables: - variables:
weather_temp: '{{ state_attr(weather_entity, "temperature") | float(15) }}' weather_temp: '{{ state_attr(weather_entity, "temperature") | float(15) }}'
# Prüfen, ob BT sagt, dass ein Fenster offen ist
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 }}"
# Winter ist alles, was NICHT Sommer ist (um Lücken zu vermeiden), oder explizit definiert is_winter_mode: "{{ weather_temp < winter_threshold }}"
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:
# Priorität 0: FENSTER OFFEN -> Sofort Stop, nichts tun. # 0. NOTBREMSE: Fenster offen
# Better Thermostat kümmert sich um das Abschalten. Wir verhindern nur das Anschalten. # 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 ist offen - Automation bricht ab und lässt BT die Kontrolle." - stop: "Fenster offen - Automation übergibt an Better Thermostat."
# Priorität 1: Sommer-Modus (Heizung aus) # 1. SOMMER: Heizung ganz aus
- conditions: - conditions:
- condition: template - condition: template
value_template: "{{ is_summer }}" value_template: "{{ is_summer }}"
@ -117,7 +121,7 @@ action:
data: data:
hvac_mode: "off" hvac_mode: "off"
# Priorität 2: Urlaubsmodus (Eco) # 2. URLAUB: Immer Eco
- conditions: - conditions:
- condition: template - condition: template
value_template: "{{ is_vacation }}" value_template: "{{ is_vacation }}"
@ -133,10 +137,11 @@ action:
data: data:
temperature: "{{ eco_temperature }}" temperature: "{{ eco_temperature }}"
# Priorität 3: Heizsaison + Schedule aktiv (Komfort) # 3. WINTER & ZEITPLAN: Komfort
# Nur wenn es wirklich kalt ist (unter Winter-Schwelle) UND der Zeitplan an ist
- conditions: - conditions:
- condition: template - condition: template
value_template: "{{ is_heating_season and schedule_active }}" value_template: "{{ is_winter_mode and schedule_active }}"
sequence: sequence:
- service: climate.set_hvac_mode - service: climate.set_hvac_mode
target: target:
@ -149,11 +154,12 @@ action:
data: data:
temperature: "{{ comfort_temperature }}" temperature: "{{ comfort_temperature }}"
# Priorität 4: Heizsaison ohne Schedule (Absenkung) # 4. DEFAULT / FALLBACK (Die ehemalige Todeszone + Nachts)
- conditions: # Wenn KEINE der oberen Bedingungen zutrifft (also weder Sommer, noch Urlaub, noch Kalter-Komfort),
- condition: template # dann greift dieser Block. Das deckt ab:
value_template: "{{ is_heating_season and not schedule_active }}" # - Winter + Nachts (Schedule aus)
sequence: # - Übergangszeit (Todeszone) egal ob Schedule an oder aus
default:
- service: climate.set_hvac_mode - service: climate.set_hvac_mode
target: target:
entity_id: !input better_thermostat_entity entity_id: !input better_thermostat_entity
@ -164,8 +170,6 @@ action:
entity_id: !input better_thermostat_entity entity_id: !input better_thermostat_entity
data: data:
temperature: "{{ eco_temperature }}" temperature: "{{ eco_temperature }}"
# Habe "+ 2" entfernt, da es unklar war. Lieber "Eco" nehmen oder eine eigene Variable "Comfort_Eco" einführen.
default: []
mode: restart mode: restart
max: 10 max: 10