I set up a bubble-button-card with a jpg as background. Working all fine so far. Now I’d like to change the sub-button based on the state of an entity (actually five different states).
But as soon as I start fiddling with that in the “custom-styles-section” of my new card all the previous changes are not working anymore, i.e. no jpg as background…
YAML code of the card is below. Thanks for any help in advance!
Yes, that looks very nice. My dashboard currently looks like this… The only thing that would make it “finish” for me personally would be more card space. Maybe a card that is a bit more square.
Hi, I have previously mentioned that there is no relevant service call to change thermostat temperature, so I am using custom button cards as they support JS. I’m keeping my fingers crossed for a thermostat bubble card.
Until then, can anyone please tell me how to modify the following code to add °C after the temperature. In other words, I currently get 21 but I would like 21°C.
I have slider buttons for my lights, and when i’m using my thumb to scroll down in the HA companion app the phone vibrates when i touch one of the slider buttons, without activating it. Is there a way to get rid of it? Kinda anoying
Thank you. What I have is fully functional. Now I just want to get the styling to match the default theme. Here’s what I’ve managed…
I think it would be better if it was formed from one button card rather than three, so the background was continuous.
It would also be better if the target temp showed °C after itself.
I don’t know CSS and am struggling to achieve this using custom button card. If any custom button card / CSS wizards can help my code at present is below.
Hi,
to begin with I’m not an CSS expert at all… but I played around a bit with the “horizontal row of sub buttons” from Cloos (see the advance sample on his github page).
it gives you at least three buttons within one button card and maybe it helps to develop your own card further. So be aware you have to play around a bit with the margins and heights, widths etc… I’m sure there is a more elegant code… but we all learn by doing and trying
EDIT: depending on resolution of tablet or whatever screen you are using you have to change the margins, heights etc… there must be a more elegant code…
Thank you for your inspiration. I have had a go at adapting my code to sub buttons as per below.
While it looks perfect, it breaks the functionality and I get an error saying "Failed to call service climate/set_temperature. expected float for dictionary value @ data[‘temperature’]
Hey Cloos, I found a quirk (which may be operating as intended/as required), but not entirely sure:
I have a bubble button that contains 4 sub-buttons. The first sub-button has show_icon set to false.
I want to dynamically change the icon for the second sub-button based on a sensor value. I would expect that I need to use subButtonIcon[1] to change its icon, but I find that I need to use subButtonIcon[0] instead.
I assume that this is because the first sub-button has its icon disabled, there isn’t an instance for it in the array?
The drawback of this is that if I want to change some other property of the sub-button, I need to use index 1 rather than 0. Or if I eventually enable the icon for the first sub-button, I need to remember to change the index from 0 to 1.
Is this expected, and is there a way to change the underlying implementation so that styles can reference the sub-button index consistently?
Interesting, it’s probably possible to change that, I have less time to work on the project at the moment so this is not my priority but I’m adding this at my to-do list.
Just started testing bubble card, getting stumped straight away with the horizontal button stack. The first two buttons overlap on the companion app on iOS.
While I “have” you, or someone else, is it possible to have a pop-up open by default? I’m trrying to create a very simple dashboard that only consists of 4 pop-ups, with one default one that is open on start, and opens if another one is closed.