I’ve read dozens of threads and I still don’t know how to solve this.
How can I make a template sensor not return a default value (like 0.0) when a referenced entity isn’t available? This usually happens when restarting home-assistant.
The default behavior for templates should be to be ‘unavailable’ until all referenced entities are available. Now templates (or is filter more accurate?) require default values, which are counted as actual states, and of course are always wrong. I don’t want wrong. I want accurate or nothing.
Templates simply output what you code them to output. If you use a sensor that is unavailable, your template should check for that. If you don’t know how to do that, you’re going to have to post your template so we can show you.