I’m new in the Home Assistant’s world.
I made a card with entity button, which watch that the person is at home or not. It’s the same color, but I would like if it change when sy home, and another color when away.
It’s the same problem, that I create an entity button with an automatition, but it doesn’t change the color when it’s on or off.
I have some binary sensor 's that I both change the icon for and change colours on (just like a bulb or switch when they go from off to on, ie I haven’t specified the colours).
Not sure it it helps in your setup as it looks like you want the button.
There are people who specialise in that but maybe @firstof9 can help until they arrive
I am using conditional cards to do this and themes (not probably the best way but it works for me)…
Themes “green” and “red” must exist in themes.yaml…
#
#
#
green:
primary-text-color: green
# paper-card-background-color: white
paper-item-icon-color: lime
secondary-text-color: green
label-badge-background-color: white
label-badge-text-color: green
label-badge-red: green
label-badge-border-color: lightgrey
#
#
#
red:
primary-text-color: red
# paper-card-background-color: white
paper-item-icon-color: red
secondary-text-color: red
label-badge-background-color: white
label-badge-text-color: red
label-badge-red: green
label-badge-border-color: lightgrey
There’s also this thread which appears VERY comprehensive.
Not tried any of it myself but given the names involved I would say there is a high degree of confidence and some of the best support available