If one of the sensors (sensor.toon_p1_power_use_low) or (sensor.toon_p1_power_use_high)
is unavailble they must not be used, because i get an error when this happens on the dasboard graph.
How is the availability template working ?
Sometimes (sensor.toon_p1_power_use_low) or sometimes (sensor.toon_p1_power_use_high) are not available and then i need still the input of one of these sensors depending on which is available.
The availability template makes the template sensor unavailable if either of the source sensors are unavailable. This will show as a gap on your graph.
If you want the last good value to be shown instead then you will have to do this:
Can this example serve as a best practise example for all template sensors? Can I assume that availability is first checked before any calculation in state is performed to avoid throwing errors in the logfiles during startup and such? Shouldn’t there be a default somethere? I’m confused.