I updated the button card recently, and all cards background color turn into gray.
It used to have white background, and when it turn on, change the color that I selected.
anyone knows how to turn this back to white when it turn off?
Setting the color to auto-no-temperature or auto should work. Otherwise you should check your theme (if you’re using one). See the documentation:
color Color of the icon/card. auto sets the color based on the color of a light including the temperature of the light. Setting this to auto-no-temperature will behave like home-assistant’s default, ignoring the temperature of the light. By default, if the entity state is off , the color will be var(--paper-item-icon-color) , for on it will be var(--paper-item-icon-active-color) and for any other state it will be var(--primary-text-color) . You can redefine each colors using state
Really hoping someone can help as Im new to this and would like to get it working.
I have a horizontal stack and within that have buttons that navigate but also show Room names and the current temperature of the room.
What I would like to do is, if the room is currently heating (this information is in an attribute of thermostat entity) I would like the font color to be red, and if its not heating, font color to be white.
The entity is called climate.wiser_lounge and the attribute is called is_heating and has a value of either true or false.
How would I code it to change the font of the temperature, which in the card is the state?
I have attached the code below, thanks for your time.
type: custom:button-card
size: null
entity: sensor.wiser_lts_temperature_lounge
icon: mdi:sofa-outline
aspect_ratio: 1/1
color_type: card
color: grey
tap_action: navigate
navigation_path: livingroom
name: Living Room
show_state: true
card size: 3
styles:
state:
- color: (this is where Im guessing the query would go?)
Thanks!
What I want is the button is white when it is off, but it is turn into specific color (#632b00) when it is on.
I don’t use any theme.
I also saw for any other state it will be var(--primary-text-color) . You can redefine each colors using state
but couldn’t figure that out how to redefine each colors with state.
Can you help me to redefine --paper-item-icon-color?
{{expand('light.living_room_wall_lights', 'entity_id')| selectattr('state','eq','on')|map(attribute='entity_id')|list|count}}/{{ expand('light.living_room_wall_lights') | count }} Lights On
And it displays what I want which is x/x Lights On
How would I get my label to show this?
I have an RGBW light controller under the light domain integrated to HA with the Magic Home add-on.
If I added it to Lovelace with a simple entity card the tap to toggle On-Off or more-info is working perfectly.
If I add this to a custom button it is not working !!!