Files
n8n-code/home_assistant/automatation_heizungscorrection_wohnzimmer.yml
2026-01-30 23:38:01 +01:00

36 lines
1.1 KiB
YAML

alias: "Heizung: Wohnzimmer Correction Anpassung"
description: ""
triggers:
- trigger: time
at: "20:01:00"
conditions: []
actions:
- variables:
temp_soll: |
{{ states('input_number.wohnzimmer_heizung_soll') | float(21.0)}}
temp_ist: |
{{ states('sensor.median_wohnzimmer_heizungskurve_letzte_6h') | float(21.0)}}
current_correction: |
{{ states('input_number.temp_correction_value_wohnzimmer') | float(0.0)}}
temp_diff: |
{{ temp_soll - temp_ist }}
correction_steps: |
{{states('input_number.temp_correction_steps') | float(0.2)}}
tolerance: |
{{0.2}}
correction: >
{% if temp_diff > tolerance %}
{{current_correction + correction_steps }}
{% elif temp_diff > (tolerance * -1) %}
{{current_correction - correction_steps}}
{% else %}
{{current_correction}}
{% endif %}
- action: input_number.set_value
metadata: {}
data:
value: "{{correction}}"
target:
entity_id: input_number.temp_correction_value_wohnzimmer
mode: single