The Problem is, when the heatpump dont work i get a “not available” from my template sensor.
How can i say the template sensor that he should be Zero when he is in truth “not available”?
I have a big problem in Grafana (with Influx) because the “last value” is NOT zero if the sensor is suddenly not available.
Thx for the quick answer.
The sensor.cop_wp_hk_hz is still not available in Homeassistant.
Is it possible that the division with 0 is the problem?
sensor.waermepumpe_hk_main_heat_energy_consumption has actualy the value “0” and the result would be a calculation >>>> 0/0
So how can i avoid it like:
If sensor.waermepumpe_hk_main_heat_energy_consumption “0” then sensor.cop_wp_hk_hz = “0” without calculation?
So im sorry the Heatpump and the sensors from it are still available but have the value “0” when not working.
At this point the template sensor.cop_wp_hk_hz (COP Waermepumpe_HK HZ) goes to not available.
value_template: >
{% if has_value('sensor.waermepumpe_hk_main_heat_energy_production') and
states('sensor.waermepumpe_hk_main_heat_energy_consumption')|float(0) != 0
^
|
Here