I’ve a problem on a custom button card configuration, i want to change icon color with value, every day the value incremented by +1 and when the value is over 6 the icon have to change from green to red, everything work fine except when the value is 10 or more, the icon return to green, i realy don’t understand what is going on, from 1 to 6 the icon is green, from 7 to 9 the icon turn red, and what i dont understand from 10 the icon return to green …
There is the configuration :
type: custom:button-card
entity: counter.jour_depuis_dernier_rangement_bureau
icon: mdi:desktop-tower-monitor
name: Rangement Bureau
color: green
styles:
card:
- height: 200px
- font-size: 18px
- font-weight: normal
state:
- value: "6"
operator: ">"
color: red
i also try with this :
type: custom:button-card
entity: counter.jour_depuis_dernier_rangement_bureau
icon: mdi:desktop-tower-monitor
name: Rangement Bureau
color: green
styles:
card:
- height: 200px
- font-size: 18px
- font-weight: normal
state:
- value: "6"
operator: ">"
color: red
- value "9"
operator : ">"
color : red
Same problem, when it go 10 or over the icon return to green.
i try it but my entity doesn’t have xxxxx.state and when i paste my entity (counter) it doesn’t want to work, but thank you for the code i’m a newbie on home assistant and you learn me something interresting
Both are indicators for strings here.
They interpret escaped characters differently, AFAIK, but they are both strings.
Not using anything makes it a number.