Another way to perform this is to use the mushroom cards which are very close to Tile cards.
And use specifically the Mushroom template cards, which gives full control on the icon, its color, the primary information, and the secondary information through JINJA2 template.
And as a bonus a small badge that you can customize in icon and color…
All this with UI available, without needing cardmod, and with the possibility to separate the behaviour for single tap, hold and double tap…
How can you prepend the secondary text using this method ?
I would love to see the last_changed attribute, but before I would also like to add the value of another sensor.
Any suggestion on how to go and change the color of the secondary text on a tile? If I replace color: red; with visibility: hidden, the text does hide, so I think the selector is working correctly, but the color is not changing.
Inspecting the DOM, I can see the .secondary with various properties including color, followed by another .secondary with only the color property, and it’s strike-through. Any ideas what’s happening?
EDIT: To answer my own question. The problem was that I need to add!importantafter the color change, so that the property is not overridden by another rule with higher specificity