And then check your js console for the state (it will probably be displayed 5 times because you have 5 buttons). It will be enclosed in quotes so that you can see if there’s something wrong.
Thanks. The console shows it returning the correct state. And when I enter the view, the correct button is “on”, then it goes “off” and a couple of seconds later comes “on” again. The whole time showing this:
When you change the view, it’s replaying the whole history of your state change (I think that’s a lovelace thing? I can see that happening on my side also for a long time).
Because you have 105 messages, this also means you had 21 state change of your input_select while the view was not displayed (or maybe displayed ?) or because you still have triggers_update: all in your config (105 messages / 5 buttons = 21 state change)
ok, I removed triggers_update: all, now the button does not update at all until I click on a different button. The console is still showing the correct state but it is never refreshing (only 5 messages). I am very sure this was not the case when i first set up these buttons, when I entered the view, the proper button was always “on”. Why would the button not turn “on” if the state matches?
Hey I just updated to 0.109 and there are two issues I am facing:
Text (for my headings) that is size 32px is being cut off from the bottom. Text below 16px is not being cut off. Before the update, the text was not cut off.
Some cards are showing the entity state as all lowercase (ex: “closed” whereas previously they would show “Closed”). This is not an issue with any regular home assistant cards.
I’ve tried restarting HA and reinstalling button card but to no avail. Any fixes for these two issues?
The only reason I can think of would be that the state doesn’t match or that you have competing css settings.
Could you share your template? (I have the same setup as you with input_select and for me it’s working fine)
When I mean some, I mean that the entities belonging to the domains cover, media_player, and lock show their states as lowercase. For example, “closed” instead of “Closed”, and “idle” instead of “Idle”, etc.
Entities belonging to the domains group, light, binary_sensor, and switch show their states correctly formatted.
Looking for some help. I’m trying to set the icon color based on the state of a different entity, but it’s not working for me.
I should mention that I was trying to get this to work prior to .109 / 3.3.1 and it’s still failing, but possibly for a different reason.
Prior to .109 / 3.3.1 the JS would return something like RGB(123,123,123) but the icon color still remained white.
After .109 / 3.3.1 the JS returns RGB(UNDEFINED).
Would there be a possibility to fill the background for say 50% (like the big number card) ?
The big number card appears to not being maintained anymore, and it also does not support tap/hold/…
Because rgb_color in states['light.office_lamp'].attributes.rgb_color is probably undefined. Also rgb_color is an array (when it’s not undefined) so you can’t use it directly. To access each value you would have to use rgb_color[0], rgb_color[1] and rgb_color[2].
Yes, like this (assuming your entity is a sensor that goes from 0 to 100, else you’d have to convert it to a 0 to 100 range):
I can see that what is returned is correct: RGB(255,36,41) so I’m assuming it has something to do with variable type? All of the JS (and an awful lot of the YAML) I know, I’ve just learned while designing my Lovelace UI