blueprint.yaml aktualisiert

This commit is contained in:
nocci 2026-01-15 15:52:34 +01:00
parent 40b4f655fb
commit 7bfab3d132

View file

@ -1,6 +1,6 @@
blueprint: blueprint:
name: Custom Better Thermostat Multi-Mode Controller name: Better Thermostat Multi-Mode Controller
description: Steuert Better Thermostat mit Sommer/Winter (Wetterbasiert), tägliche Schedule, Anwesenheit (optional) und Urlaubs-Button. Für Homematic IP + SHT31. description: Steuert Better Thermostat mit Sommer/Winter (Wetterbasiert), tägliche Schedule, Anwesenheit (optional) und Urlaubs-Button
domain: automation domain: automation
input: input:
better_thermostat_entity: better_thermostat_entity:
@ -17,14 +17,14 @@ blueprint:
domain: schedule domain: schedule
presence_entity: presence_entity:
name: Anwesenheit (optional) name: Anwesenheit (optional)
description: Leer lassen für immer present description: Leer lassen für immer anwesend
default: ""
selector: selector:
entity: entity:
domain: binary_sensor domain: binary_sensor
default: {}
vacation_helper: vacation_helper:
name: Urlaubsmodus Helper name: Urlaubsmodus Helper
description: input_boolean.urlaub description: input_boolean für Urlaub
selector: selector:
entity: entity:
domain: input_boolean domain: input_boolean
@ -36,40 +36,46 @@ blueprint:
domain: weather domain: weather
summer_temp_threshold: summer_temp_threshold:
name: Sommer-Schwellwert name: Sommer-Schwellwert
description: Wenn Vorhersage über dieser Temp, Heizung aus
default: 25 default: 25
selector: selector:
number: number:
min: 18 min: 16
max: 50 max: 50
step: 1 step: 1
unit_of_measurement: "°C"
winter_temp_threshold: winter_temp_threshold:
name: Winter-Schwellwert name: Winter-Schwellwert
description: Wenn Vorhersage unter dieser Temp, Winter-Modus
default: 10 default: 10
selector: selector:
number: number:
min: 0 min: 0
max: 20 max: 20
step: 1 step: 1
unit_of_measurement: "°C"
eco_temp: eco_temp:
name: Eco Temp name: Eco Temperatur
description: Temperatur bei Abwesenheit/Urlaub
default: 15 default: 15
selector: selector:
number: number:
min: 10 min: 10
max: 18 max: 18
step: 0.5 step: 0.5
unit_of_measurement: "°C"
comfort_temp: comfort_temp:
name: Komfort Temp name: Komfort Temperatur
description: Temperatur wenn Schedule aktiv
default: 21 default: 21
selector: selector:
number: number:
min: 18 min: 18
max: 24 max: 24
step: 0.5 step: 0.5
unit_of_measurement: "°C"
trigger: trigger:
- platform: state
entity_id: !input better_thermostat_entity
- platform: state - platform: state
entity_id: !input schedule_entity entity_id: !input schedule_entity
- platform: state - platform: state
@ -78,31 +84,109 @@ trigger:
entity_id: !input presence_entity entity_id: !input presence_entity
- platform: state - platform: state
entity_id: !input weather_entity entity_id: !input weather_entity
- platform: time_pattern
minutes: "/30"
condition: [] condition: []
action: action:
- variables: - variables:
we: "{{ states(''' + '''!input weather_entity) }}" weather_entity: !input weather_entity
wt: "{{ state_attr(we, 'forecast')[0].temperature if state_attr(we, 'forecast') and state_attr(we, 'forecast')|length > 0 else 0 }}" schedule_entity: !input schedule_entity
is_summer: "{{ wt | float(0) > [blueprint_input.summer_temp_threshold] | float(25) }}" vacation_entity: !input vacation_helper
is_winter: "{{ wt | float(0) < [blueprint_input.winter_temp_threshold] | float(10) }}" presence_entity: !input presence_entity
is_vacation: "{{ states(''' + '''!input vacation_helper) == 'on' }}" summer_threshold: !input summer_temp_threshold
p: "{{ states(''' + '''!input presence_entity) }}" winter_threshold: !input winter_temp_threshold
is_present: >- eco_temperature: !input eco_temp
{%- set p = states('!input presence_entity') -%} comfort_temperature: !input comfort_temp
{%- if p == 'unknown' or p == 'unavailable' or !input presence_entity == '' -%}
true - variables:
{%- else -%} forecast: "{{ state_attr(weather_entity, 'forecast') }}"
{{ p == 'on' }} weather_temp: "{{ forecast[0].temperature if forecast and forecast|length > 0 else 15 }}"
{%- endif -%} is_summer: "{{ weather_temp | float(15) > summer_threshold | float(25) }}"
schedule_active: "{{ states(''' + '''!input schedule_entity) == 'on' }}" is_winter: "{{ weather_temp | float(15) < winter_threshold | float(10) }}"
is_vacation: "{{ states(vacation_entity) == 'on' }}"
presence_state: "{{ states(presence_entity) if presence_entity != '' else 'on' }}"
is_present: "{{ presence_state in ['on', 'home', 'unknown', 'unavailable'] }}"
schedule_active: "{{ states(schedule_entity) == 'on' }}"
- choose: - choose:
# Priorität 1: Sommer-Modus (Heizung aus)
- conditions: - conditions:
- "{{ is_summer }}" - condition: template
value_template: "{{ is_summer }}"
sequence: sequence:
- service: climate.set_hvac_mode - service: climate.set_hvac_mode
target: target:
entity_id: !input better_thermostat_entity entity_id: !input better_thermostat_entity
data: data:
hvac_mode hvac_mode: "off"
# Priorität 2: Urlaubsmodus (Eco)
- conditions:
- condition: template
value_template: "{{ is_vacation }}"
sequence:
- service: climate.set_hvac_mode
target:
entity_id: !input better_thermostat_entity
data:
hvac_mode: "heat"
- service: climate.set_temperature
target:
entity_id: !input better_thermostat_entity
data:
temperature: "{{ eco_temperature }}"
# Priorität 3: Abwesenheit (Eco)
- conditions:
- condition: template
value_template: "{{ not is_present and not is_vacation }}"
sequence:
- service: climate.set_hvac_mode
target:
entity_id: !input better_thermostat_entity
data:
hvac_mode: "heat"
- service: climate.set_temperature
target:
entity_id: !input better_thermostat_entity
data:
temperature: "{{ eco_temperature }}"
# Priorität 4: Winter + Schedule aktiv (Komfort)
- conditions:
- condition: template
value_template: "{{ is_winter and schedule_active and is_present }}"
sequence:
- service: climate.set_hvac_mode
target:
entity_id: !input better_thermostat_entity
data:
hvac_mode: "heat"
- service: climate.set_temperature
target:
entity_id: !input better_thermostat_entity
data:
temperature: "{{ comfort_temperature }}"
# Priorität 5: Winter ohne Schedule (reduzierte Temp)
- conditions:
- condition: template
value_template: "{{ is_winter and not schedule_active and is_present }}"
sequence:
- service: climate.set_hvac_mode
target:
entity_id: !input better_thermostat_entity
data:
hvac_mode: "heat"
- service: climate.set_temperature
target:
entity_id: !input better_thermostat_entity
data:
temperature: "{{ eco_temperature + 2 }}"
default: []
mode: queued
max: 10