Hey there!
I’ve been trying to figure this out for several days now, but I guess I am missing something in the docs/forums. I have a self-made calendar sensor that shows the days until various trash categories will be picked up (I live in Germany, trash pickup-is quite complex here). In the dashboard it looks like this:
(= four entity cards stacked horizontally)
The values are delivered to HA via MQTT (so it is not an actual calendar) and are stored as attributes of the sensor. That part seems to work just fine. I’ve also created a binary sensor for each category that switches to “on” as soon as there is only 1 day left until pickup. What I don’t get: How can I use “state_color” to turn on the color highlighting if there is only 1 day left for a category? Is this possible with a regular entity card? Can somebody hint me in the right direction, please? This is driving me nuts!
I’ve tried a lot of variations of this, but it does not work:
type: entity
entity: sensor.abfallkalender
attribute: biotonne
unit: Tage
state_color: true
icon: mdi:biohazard
name: Bio
value_template: '{{ is_state("binary_sensor.biomuell_due", "on") }}'
Thanks for your help!
PS: I’m sure you can tell that I’m very new to Home Assistant (so: Hi!) and I don’t have a very good grasp (yet) on how things work, how all the parts fit together and how I use YAML on the CLI for some and the UI for other things. But I’m sure, I’ll get there!