blueprint.yaml aktualisiert

This commit is contained in:
nocci 2026-01-16 11:29:08 +01:00
parent 9b7966dd1c
commit 7003cc29e0

View file

@ -1,55 +1,120 @@
alias: Klima BT Wohnzimmer blueprint:
description: "Steuerung mit Fenster-Logik, Sommer/Winter und Zeitplan" name: Better Thermostat Controller (Optimized)
mode: restart description: Steuert BT mit Priorität Fenster > Sommer > Urlaub > Schedule. Mit Default-Fallback für Lücken.
max: 10 domain: automation
triggers: input:
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 Heizung AUS.
default: 18
selector:
number:
min: 15
max: 30
step: 1
winter_temp_threshold:
name: Winter-Schwellwert (°C)
description: Unter dieser Temp ist Komfort-Modus erlaubt.
default: 18
selector:
number:
min: 10
max: 25
step: 1
eco_temp:
name: Eco Temperatur (°C)
description: Standard/Nacht/Urlaub Temperatur.
default: 17
selector:
number:
min: 10
max: 20
step: 0.5
comfort_temp:
name: Komfort Temperatur (°C)
description: Temperatur bei aktivem Zeitplan.
default: 21
selector:
number:
min: 18
max: 24
step: 0.5
trigger:
- platform: state - platform: state
entity_id: schedule.heizzeitplan_wohnzimmer entity_id: !input schedule_entity
- platform: state - platform: state
entity_id: input_boolean.urlaubsmodus_heizunh # Prüfe, ob "heizunh" wirklich stimmt! entity_id: !input vacation_helper
- platform: state - platform: state
entity_id: weather.schleswig entity_id: !input weather_entity
attribute: temperature attribute: temperature
- platform: time_pattern - platform: time_pattern
minutes: /30 minutes: "/30"
- platform: state - platform: state
entity_id: climate.klima_bt_wohnzimmer entity_id: !input better_thermostat_entity
attribute: window_open attribute: window_open
actions:
condition: []
action:
# Variablen definieren, um Inputs intern nutzbar zu machen
- variables: - variables:
bt_entity: climate.klima_bt_wohnzimmer bt_entity: !input better_thermostat_entity
weather_entity: weather.schleswig weather_entity: !input weather_entity
schedule_entity: schedule.heizzeitplan_wohnzimmer schedule_entity: !input schedule_entity
vacation_entity: input_boolean.urlaubsmodus_heizunh vacation_entity: !input vacation_helper
summer_threshold: 18 summer_threshold: !input summer_temp_threshold
winter_threshold: 18 winter_threshold: !input winter_temp_threshold
eco_temperature: 18 eco_temperature: !input eco_temp
comfort_temperature: 20.5 comfort_temperature: !input comfort_temp
# Logik-Variablen berechnen
- 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) }}'
is_summer: "{{ weather_temp > summer_threshold }}" 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_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:
# 1. FENSTER OFFEN -> STOP # 1. FENSTER OFFEN -> STOP (BT übernimmt)
- 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 stoppt."
# 2. SOMMER -> AUS # 2. SOMMER -> AUS
- conditions: - conditions:
- condition: template - condition: template
value_template: "{{ is_summer }}" value_template: "{{ is_summer }}"
sequence: sequence:
- action: climate.set_hvac_mode - service: climate.set_hvac_mode
target: target:
entity_id: climate.klima_bt_wohnzimmer entity_id: !input better_thermostat_entity
data: data:
hvac_mode: "off" hvac_mode: "off"
@ -58,14 +123,14 @@ actions:
- condition: template - condition: template
value_template: "{{ is_vacation }}" value_template: "{{ is_vacation }}"
sequence: sequence:
- action: climate.set_hvac_mode - service: climate.set_hvac_mode
target: target:
entity_id: climate.klima_bt_wohnzimmer entity_id: !input better_thermostat_entity
data: data:
hvac_mode: heat hvac_mode: "heat"
- action: climate.set_temperature - service: climate.set_temperature
target: target:
entity_id: climate.klima_bt_wohnzimmer entity_id: !input better_thermostat_entity
data: data:
temperature: "{{ eco_temperature }}" temperature: "{{ eco_temperature }}"
@ -74,26 +139,29 @@ actions:
- condition: template - condition: template
value_template: "{{ is_heating_season and schedule_active }}" value_template: "{{ is_heating_season and schedule_active }}"
sequence: sequence:
- action: climate.set_hvac_mode - service: climate.set_hvac_mode
target: target:
entity_id: climate.klima_bt_wohnzimmer entity_id: !input better_thermostat_entity
data: data:
hvac_mode: heat hvac_mode: "heat"
- action: climate.set_temperature - service: climate.set_temperature
target: target:
entity_id: climate.klima_bt_wohnzimmer entity_id: !input better_thermostat_entity
data: data:
temperature: "{{ comfort_temperature }}" temperature: "{{ comfort_temperature }}"
# 5. DEFAULT (Alles andere: Winter ohne Schedule, genau 18 Grad, etc.) -> ECO # 5. DEFAULT (Alles andere) -> ECO
default: default:
- action: climate.set_hvac_mode - service: climate.set_hvac_mode
target: target:
entity_id: climate.klima_bt_wohnzimmer entity_id: !input better_thermostat_entity
data: data:
hvac_mode: heat hvac_mode: "heat"
- action: climate.set_temperature - service: climate.set_temperature
target: target:
entity_id: climate.klima_bt_wohnzimmer entity_id: !input better_thermostat_entity
data: data:
temperature: "{{ eco_temperature }}" temperature: "{{ eco_temperature }}"
mode: restart
max: 10