I have templating in various cards that I setup a while ago without any issues, but now trying to make a new card I’m struggling to get it to work for some reason.
When I use icon: ‘mdi:fan’ for the fan it works fine, but as soon as I use icon_template: it switches back to the default icon and ignores the template entirely :
I tried template-entity-row first, but with that one the toggle button went away (replaced by “on” / “off”), the fan is automated so I’m not sure I’ll be using the toggle anyway but just in case I went with card-templater, which simply works.
I didn’t realize that was simply impossible without a plugin, thanks for all the tips ! It’s working great now
Actually the template-entity-row works fine with input_xxx entities. I use it quite a bit in my ui. It has a lot of nice features for packing a lot of information in the space of a normal entity row.
True. The toggle is still in the more-info dialog which you access by clicking on the control. If you rarely use it then not sure it matters. The advantage is you get templates for all the options plus control over the secondary text line. Seems like a fair tradeoff in some circumstances.
never tried that but presume it’s true as it’s not a custom card. well, for me it was a deal breaker as I don’ want such a long way to turn my setting on or off. UPDATE: actually, I used that card when it didn’t support more-info, it’s been added quite recently but I’ve already moved to more flexible solution (button-card)
To deal with this issue I ended up creating a “custom” control using stack-in-card, input_boolean wrapped in hue-element (so I can things like conditionally hiding and styling).
That is what I meant yes, I want to keep the toggle at the end of the line so that plugin doesn’t fit unfortunately.
But card-templater works really well and is very simple to use :