Hi everyone, I have started to use Home Assistant a few months ago and I love it. Still pretty noob at some things (as I had no knowledge of YAML before). However after some months I got myself a nice setup (at least I think so for a noob ). I have started to work on lovelace a few weeks ago and it is great. However I stumbled upon a problem with the entity-button card.
Question 1
I have rows of four (see screens below) and the buttons look nice but I need to have four buttons each row or else the buttons become massive as they stretch to fit the card. Is it possible to have an empty button? Or is this only possible with the custom card which is available as well? At the moment I use a very small icon with invisible text to make the button appear like in the screenshot. I configured the button to take no action when pressed and when held.
Question 2
I have some media players in an entity-button card, just because this will turn the devices on or off. However if I use a media-player as entity-button then there is no state change on the cards (see screens below). In the screenshot my xbox and my samsung TV are both turned off, however in reality they are turned on (and the state is turned to âonâ in home assistant as well. This only applies to media-players as an entity-button. Is there any way to manually add a state color to an entity-button regardless of what the actual state is? For example: I used OpenHAB in the past, where it was possible to assign a state from a different device to a button (e.g. I could use any pingable IP to set the state of an empty button). Would this be possible here as well? Or is is possible to just have the color change?
I too want to know how (if its even possible) to have the colour of an entity-button change based on the state of the entity. ie: I have created an entity-button for an input_boolean and the state changes when clicked but the button colour remains the same. Pretty poor if thatâs the default functionality. We shouldnât have to muck around with custom settings etc for something so simple. Hoping itâs just something Iâve missedâŠ
Itâs the same on Glance cards, switches and lights will change icon colour but not input_booleans. Itâs frustrating because it restricts being able to use them in a nice clean manner. I am currently forced to enable show_state: true for these so that I get state text, but I really donât want text in my Glance cards
I have already tried that, but using that would make the button half sized. This doesnât look nice and I still need to assign an entity to the button. Otherwise it wonât even work at all.
I have found my solution in using a custom card known as: âbutton-cardâ. This card allows me to do all that I want like setting it to color the entire button instead of just the icon and put in custom state colors. For example you could give a color to your buttons depending on the state the entity is in. E.g. you could make your media player button change color depending on whether it was playing, paused or turned off.
It looks quite nice and the empty button cards are really empty (no entity or icon required). Only thing is, you canât set up a hold action which is too bad. Also to that I have made my solution with a mix of entity buttons (so I can still use the hold button function) and entity buttons for my mediaplayers and blank spaces. Obviously this mix wonât work well if you color the buttons as you canât color entity-button. See screenshots below.
As you can see my devices are colored now. My xbox for example has the state âunknownâ whenever it is just idle, so home assistant wonât see this as turned on. With this custom card I have set up a green color for my xbox whenever it is in an âunknownâ or âonâ state.
I hope they will do something like this custom button with the official entity-button one so I could use the âcolor buttonâ and âhold buttonâ at the same time, which unfortunately isnât present at the moment.
For the ones interested, hereâs the link to the custom card.
Watch out. Button card has been acting up since 0.85 for me. It works great for a long time, then for no reason it will disappear and error out. Nothing I change will make it work right. I hadnât touched Lovelace and it stopped working for me yesterday. It isnât my browser, not only did I clear my cache for my domain multiple times, but I also tried the HA iOS app, and Chrome in addition to Safari. It also did this the first time I tried updating to 0.85.1, and somehow going back to 0.85.0 magically fixed it. Well, yesterday, I hadnât updated HA or anything. Just restarted many times while testing code like usual.