I want to set up a quick and easy dashboard for my wife…and basically track various entities like batteries, temperatures, leak conditions, where the only indicators for each entity are:
Red - pay attention, something happened and needs fixing
Yellow - something “may” happen (mostly for batteries)
Green - all good, ignore
Is there a one-size-fits-all method of doing this without getting overly crazy in coding? And yes, the entity states will vary to %, volume, temp, “leak detected” or whatever. No actual temps or % required…really just a “notifier” for when I’m not available to fix something.
Tile card provides limited state-based control of icon color but not text or background. If that’s not enough, custom config template card might work for you. GitHub - iantrich/config-template-card: 📝 Templatable Lovelace Configurations
This card wraps any? HA card to enable any object in the card as a template.
For example, below is the yaml for 2 button cards where the theme is set based on the state of an input helper.
If you do not want to deal with jinja, you may try your luck with JS - either with mentioned config-template-card wrapping any card (supporting js templates), or a custom button card. The latter card (in addition to js templates) supports state-dependent styles with “just yaml”.