[Example] Progressbar, % bar #928
Replies: 5 comments 13 replies
-
Thank you very much for that code. Looks great but I am struggling to implement it based on a different entity than defined in the bubble-card entity. I tried different options but none of them worked. So is there a way to use a different entity than the variable "state"? Tried it with "states("another_entity")" and so on...
|
Beta Was this translation helpful? Give feedback.
-
Here is a small guide to get this to work with a climate card: #996 (reply in thread) |
Beta Was this translation helpful? Give feedback.
-
Amazing job! |
Beta Was this translation helpful? Give feedback.
-
Trying to do something similar here, but instead mimic the visual appearance of slider button to show state, but remove the sliding functionality. I can't quite get the CSS right, especially to dynamically adjust with the light color. The top button is a normal slider. The middle button is the one I am trying to match the top button. I assume it is just a matter of using the correct variables, but not sure what they are. For testing purposes I just used static colors (which come back inverted). Using the bubble theme :host{
--color-bar: #9933ffAA;
--color-background: #3333ffAA;
}
.bubble-button-card-container {
background: linear-gradient(
to right,
var(--color-bar) 0%,
var(--color-bar) ${Math.round((hass.states['light.office_lamp_upstairs'].attributes.brightness) / 255 * 100)}%,
var(--color-background) ${Math.round((hass.states['light.office_lamp_upstairs'].attributes.brightness) / 255 * 100)}%,
var(--color-background) 100%
) !important;
} Appreciate any help here. |
Beta Was this translation helpful? Give feedback.
-
I used this code snipped to display my battery percentages. But with the latest bubble card releases it's not working for me anymore. Could someone possibly create a module out of this, that noobs like could use it? |
Beta Was this translation helpful? Give feedback.
-
Extra features:
Beta Was this translation helpful? Give feedback.
All reactions