alias: Heizungsstufe (Schlafzimmer) description: "" triggers: - trigger: time at: "22:05:00" conditions: [] actions: - variables: sunny_weight: | {% if states('sensor.forecast_sunny') | float(0.0) > 0 %} {{-0.2}} {% else %} {{0.0}} {% endif %} wind_weight: | {{states('sensor.forecast_wind') | float(0.0)}} forecast_temp_min: | {{states('sensor.forecast_min') | float(21.0)}} temp_soll: | {{states('input_number.schlafzimmer_heizung_soll') | float(17)}} temp_ist: | {{states('sensor.median_schlafzimmer_heizungskurve_letzte_6h')}} temp_diff: | {{temp_soll - temp_ist}} feedback_factor: | {{ 0.2 }} correction: | {{states('input_number.temp_correction_value_schlafzimmer')}} ladestufe_calc: > {% set base_load = ((15 - forecast_temp_min) / 10) %} {% set weather_impact = sunny_weight + wind_weight %} {{ base_load + weather_impact + correction}} ladestufe: | {% if ladestufe_calc < 0.0 %} {{0.0}} {% else %} {{ladestufe_calc}} {% endif %} - action: notify.mobile_app_mi_9t metadata: {} data: message: > Sunny: {{sunny_weight}} Wind: {{wind_weight}} Temp: {{forecast_temp_min}} Lvl: {{ladestufe}} title: Schlafzimmer (Ladestufe auf {{ ladestufe }}) - action: notify.mobile_app_pixel_9 metadata: {} data: message: > Sunny: {{sunny_weight}} Wind: {{wind_weight}} Temp: {{forecast_temp_min}} Lvl: {{ladestufe}} title: Schlafzimmer (Ladestufe auf {{ ladestufe }}) mode: single