I am trying to build a Lovelace Card that will display a Gauge (to match the style of others in the Dashboard) with a sensor value in the name: field. Unfortunately my attempts are not going very well .
If I place one sensor in a Gauge Card and the other in an Entity Card they both update fine.
But if I put the two sensors in a config-template-card card as shown (on left) below, the updates stop after about an hour. I can force an update by refreshing the web page. Swapping browsers (gecko/blink engines) make no difference. Clicking and examining the âageâ in the config-template-card is MUCH older than the age in the Entity Card.
you only need variables if you plan to use them (you arenât using them). Second, your template isnât in quotes. You need to use quotes for single line templates in yaml or you need to use multiline yaml notation.
Besides, placing Gauge card into config-template-card will cause a needle to reset on every update (unless you do prefer this animation - as you said in another your similar thread).
As for âanother wayâ - already explained you in details where to get an auto-entities-based solution.
In case you keep digging into config-template-card - suggest to use the main dedicated thread instead of creating new similar threads.
I guess it was safe, as those variables only change every now and then, and are not sensor entities of temperature or powerâŚ
btw, I do believe we can do the same in core automations and scripts. I had all templates on multiline , but theFes showed me it wasnt required at all times (need to find the exampleâŚ)
weâd need to ask him again, I cant find it anymore, believe it was in Discord
anyways, this works:
test_cloud_say_label_singleline:
mode: restart
sequence:
- action: tts.cloud_say #tts.google_say
data:
cache: false
language: >
{{states('sensor.tts_taal')}}
entity_id: >
{{label_entities('alarm_speler')}}
message: dit is een test over {{label_entities('alarm_speler')}}
but the language and entity_id need the quotes or the multiline
itâs probably as with using the *.
when a line starts with that *, we need the quote, if characters precede it, we dont (see decluttering card, auto-entities, but also customize (globs)
Thank you very much Marius,
I shall be marking your last post as a solution but I wanted to say that I really appreciated your (and others) help and the âlittle trickâ. It makes the code so much cleaner and readable for me. And I can remove the config-template-card package from my system.
Apologies for not responding sooner but I wanted to watch for a good 24 hours and (of course) it is working flawlessly.