HA-Heizung/heizung.yaml
2025-12-07 20:49:53 +01:00

148 lines
3.8 KiB
YAML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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:
# 1⃣ 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 }}"
# 2⃣ Fenster offen
- conditions:
- condition: template
value_template: "{{ is_window_open }}"
sequence:
- service: climate.set_temperature
target:
entity_id: !input thermostat
data:
temperature: "{{ t_window }}"
# 3⃣ 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 }}"
# 4⃣ 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 }}"