lovelace-auto-entities
lovelace-auto-entities copied to clipboard
Alter state: "unknown" to 0
Hi,
I am using this great auto entities card to display battery gauges for my battery devices. Only issue is I have some that when they go flat or have an error report "unknown" instead of a numeric amount.
It would be great to be able to replace the "unknown" state with "0" on the fly so my gauge would show empty instead of an error.
I have tried using value templates but these don't seem to work in the auto-entities card.
"{% if is_state('unknown')%} 0 {% else %} val {% endif %}"
Not sure if this is something that can be do fixed by you or I just have to live with, but if you could help it would be appreciated.
Thanks, Shane.
This is not a bug report or a FR. Suggest to ask similar questions in the dedicated HA community thread. https://community.home-assistant.io/t/auto-entities-automatically-fill-cards-with-entities/147801