Fixed 'Leckstrom' template sensor to not go wild because of solar power.

This commit is contained in:
Marcus Scholz 2023-06-24 11:37:05 +02:00
parent 55e1a02544
commit 6e48e18384

View File

@ -45,6 +45,7 @@ template:
icon: mdi:flash icon: mdi:flash
state: > state: >
{% set total = states('sensor.netzleistung') | float %} {% set total = states('sensor.netzleistung') | float %}
{% set solar = states('sensor.balkonkraftwerk_power') | float %}
{% set raumduft = states('sensor.flur_raumduft_power') | float %} {% set raumduft = states('sensor.flur_raumduft_power') | float %}
{% set keller = states('sensor.keller_power') | float %} {% set keller = states('sensor.keller_power') | float %}
{% set anrichte = states('sensor.kuche_anrichte_power') | float %} {% set anrichte = states('sensor.kuche_anrichte_power') | float %}
@ -56,7 +57,7 @@ template:
{% set serverraum = states('sensor.serverraum_power') | float %} {% set serverraum = states('sensor.serverraum_power') | float %}
{% set heimkino_wz = states('sensor.wohnzimmer_heimkino_power') | float %} {% set heimkino_wz = states('sensor.wohnzimmer_heimkino_power') | float %}
{% set spieleschrank = states('sensor.wohnzimmer_spieleschrank_power') | float %} {% set spieleschrank = states('sensor.wohnzimmer_spieleschrank_power') | float %}
{{ (total - raumduft - keller - musik - bett - heimkino_sz - deko - schreibtisch - serverraum - heimkino_wz - spieleschrank) | round(1) }} {{ (total + solar - raumduft - keller - musik - bett - heimkino_sz - deko - schreibtisch - serverraum - heimkino_wz - spieleschrank) | round(1) }}
# calendar integration # calendar integration
calendar: !include calendars.yaml calendar: !include calendars.yaml