I am calculating the realtime COP of my heat pump. But when the heatpump is off, there is a zero in the denominator (sensor.energy_heatpump_wp_electricity_usage)
It works in the developer tools template editor but does not work in home-assistant
When I try to check configuration, the check process keeps running and the wheel keeps spinning.
So how can I do a conditional value_template calculation?
That solved the check configuration loop! Thanks.
I have copied your answer in my value_template. The result (cop_wp) value is still unavailable, while both variables in the calculation have a value. There was a " at the end of the line in your answer, removed it, but that did not help.
Thank you both! My problems are solved. YAML is quite a steap learning curve coming from Domoticz. But the support from other users and moderators is great!