I have no idea why you’re arguing here. In templates, you must cover all state possibilities in code if you want to avoid having unknown or unavailable sensors. I explained this in the other thread you started with this. If you want meaningful states at all times, you must code it that way.
I start to understand. What was weird to me is how HA handles this. I never had issues and at some point I will have, because this error management is in place. That is why I am doing this right now.
Take it simple: why does HA just label a sensor unknown if a state is missing or wrong? As far as I understand this is the behavior right now.
I don’t want to argue, I want to understand.
If you don’t know something, is it known or unknown?
It is unknown. So the sensor should report unknown.
Binary entities will. Everything else will report whatever you coded it as (sensors)