HA-Heizung/heizung.yaml
2025-12-07 20:57:11 +01:00

148 lines
3.8 KiB
YAML

blueprint:
name: HA Raumtemperatursteuerung mit Zeitplan, Fenstern, Türen & Partymodus
description: >
Steuert ein Thermostat basierend auf Zeitplan (Tag/Nacht),
Partymodus, offenen Fenstern oder geöffneten Innentüren.
Wenn Partymodus aktiv ist, haben Fenster und Türen keine Relevanz.
domain: automation
input:
thermostat:
name: Thermostat
description: Das zu steuernde Thermostat
selector:
entity:
domain: climate
temp_day:
name: Zieltemperatur Tag
selector:
entity:
domain: input_number
temp_night:
name: Zieltemperatur Nacht
selector:
entity:
domain: input_number
temp_party:
name: Zieltemperatur Party
selector:
entity:
domain: input_number
temp_window:
name: Zieltemperatur Fenster auf
selector:
entity:
domain: input_number
temp_doors:
name: Zieltemperatur Innentüren auf
selector:
entity:
domain: input_number
party_mode:
name: Partymodus (input_boolean)
selector:
entity:
domain: input_boolean
schedule_daynight:
name: Zeitplanhelfer (Schedule)
description: Liefert true für Tag, false für Nacht
selector:
entity:
domain: schedule
window_sensor:
name: Fensterstatus (binary_sensor)
description: ON = Fenster offen
selector:
entity:
domain: binary_sensor
door_sensor:
name: Türstatus (binary_sensor)
description: ON = Tür offen
selector:
entity:
domain: binary_sensor
mode: single
trigger:
- platform: state
entity_id: !input window_sensor
- platform: state
entity_id: !input door_sensor
- platform: state
entity_id: !input party_mode
- platform: state
entity_id: !input schedule_daynight
- platform: state
entity_id:
- !input temp_day
- !input temp_night
- !input temp_party
- !input temp_window
- !input temp_doors
action:
- variables:
is_window_open: "{{ is_state(input.window_sensor, 'on') }}"
is_door_open: "{{ is_state(input.door_sensor, 'on') }}"
is_day: "{{ is_state(input.schedule_daynight, 'on') }}"
is_party: "{{ is_state(input.party_mode, 'on') }}"
t_day: "{{ states(input.temp_day) | float }}"
t_night: "{{ states(input.temp_night) | float }}"
t_party: "{{ states(input.temp_party) | float }}"
t_window: "{{ states(input.temp_window) | float }}"
t_doors: "{{ states(input.temp_doors) | float }}"
- choose:
# Party-Modus → höchste Priorität
- conditions:
- condition: template
value_template: "{{ is_party }}"
sequence:
- service: climate.set_temperature
target:
entity_id: !input thermostat
data:
temperature: "{{ t_party }}"
# Fenster offen
- conditions:
- condition: template
value_template: "{{ is_window_open }}"
sequence:
- service: climate.set_temperature
target:
entity_id: !input thermostat
data:
temperature: "{{ t_window }}"
# Innentüren offen
- conditions:
- condition: template
value_template: "{{ is_door_open }}"
sequence:
- service: climate.set_temperature
target:
entity_id: !input thermostat
data:
temperature: "{{ t_doors }}"
# Standard Tag/Nacht Steuerung
- conditions: []
sequence:
- service: climate.set_temperature
target:
entity_id: !input thermostat
data:
temperature: "{{ t_day if is_day else t_night }}"