-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Great work on this - very useful card!
Having customisable colors based on entity values gives a very quick visual indication of status. In my use case, I have a 6kW inverter so coloring the Home icon based on the load lets me see at a glance where I am. I could also color-code the battery icon based on the SoC, or even the PV icon based on what the expected production for the day is.
I've managed to get something working using card-mod. It requires disabling the gradient fill, but works decently well otherwise. I've also disabled the glow effect as I haven't been able to style that successfully yet.
card_mod:
style: |
svg.home-icon path {
{% if states("sensor.load_power")|float >= 5000 %}
fill: red;
{% elif states("sensor.load_power")|float >= 3500 %}
fill: orange;
{% elif states("sensor.load_power")|float >= 1500 %}
fill: gold;
{% elif states("sensor.load_power")|float >= 500 %}
fill: green;
{% else %}
fill: royalblue;
{% endif %}
}Metadata
Metadata
Assignees
Labels
No labels