If you mean the default colors of the custom card itself, compare the instructions in the readme:
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) .
So in your case it is:
[[[
if (states['input_boolean.barn_light'].state == 'on')
return "var(--paper-item-icon-active-color)";
return "var(--paper-item-icon-color)";
]]]
I hope someone can help me with this. According to the docs itās not supported, but could be the docs arenāt updating in this regard. Basically I want a service call to either contain data A or B depending on an attribute of the entity. For example:
if (entity.attributes.is_volume_muted == false) THEN:
Is this possible in a single call-service action? I want to create a button that mutes/unmutes depending on the attribute of the entity (which depends on the is_volume_muted attribute). The challenge is that I canāt use a script, because I use this button inside an other card, which is part of a decluttering card. The main goal is so I can use this single button, for all my media_players to mute/unmute.
Hello,
I would like to do a button with a circular timer on the right top corner.
The button activate a āinput_boolean.scaldabagno_temporizzatoā and the timer is ātimer.scaldabagnoā.
Timer is in minutes (2min - 20 min the tipical range)
Can anybody help me?
Iām not able to work with āadvanced styling optionsā and with ācuston fieldsā, least of all with structured templates and I would like someone to show me how to create the code to take it as an example and learn how to make others.
(
Is it possible to have a shadow behind an icon? In this particular case I donāt use any text and there is no card background (set tot none), so I strictly use an icon and want a shadow effect. text-shadow and box-shadow donāt work in this case. I could have sworn I saw someone post something like that, but I canāt find it anywhere.
Hey
First of all i am new to home assistance.
working on my dashboard and i am using ācustom:button-cardā
in this example i am using show_last_changed: true instead of label ( because label is not updated in the frontend)
this how i control the style
label:
- font-size: 11px
- padding-left: 5px
- justify-self: left
- margin-top: 0%
i am trying to shorten the ā35 minutes agoā to 35m and if its hours then 2h
like here
any help where can i control this transformation and what is the syntax for this
i went over the docs for button card several times and could not figure it out.
Iāve opted to expand this challenge to itās own thread ā¦ since it may not fit just under the button-card, and Iām open to all options to get the job done.
Iāve got a challenge on my hands.
It may not be challenging for you beautiful people, but hey ho, thatās why Iām here seeking brains that arenāt as frazzled as mine.
Background
Iāve tried doing what Iām about to describe using a picture-entity card - got most of the way there with separate images, but for some I get a spinner of death after a certain number of entity state images (I think it was after 8ā¦).
So two options to overcome this - a: card-modā¦ or b: custom button card!
Here I am trying out the custom button card solution and itās getting too late for me to get it working on own.
My challenges (to me and) to you!
Iām trying to create a card that displays a picture of my car - as an SVG image. (The easy part)
Iām trying to update the fill colour of various paths (identified by class tags) based on the state of a sensor entity. (my javascript is weakā¦ and googling says Iām the only one mad enough to try it in lovelace and the custom components Iāve gotā¦ or Iām using the wrong search terms).
Each item is on a different sensor: eg, front right door lock = sensor.car_front_door_right, front left window = sensor.car_front_left_window
Iām not sure where to put the javascript so itāll update (Iāve got a hunch, but am I right?) the one image from multiple sensorsā¦
Below is where I got to so far, Iāll carry on hacking away
Sample of SVG Image with sample classes: carOutline, doorHandle_rearLeft, doorHandle_rearRight,
doorHandle_frontLeft,doorHandle_frontRight ā¦ can be found here on dropbox.