Clooos / Bubble-Card

Bubble Card is a minimalist card collection for Home Assistant with a nice pop-up touch.
MIT License
1.44k stars 39 forks source link

Button slider read-only mode - feature request #604

Open DaveP317 opened 6 days ago

DaveP317 commented 6 days ago

(I'm adding this issue so that I can do a pull request to implement the feature myself.)

In my use-cases, I have a dashboard configured with bubble button cards in slider mode, where the sliders indicate the battery charge level or fuel/water tank level. The values are derived from input_number elements, but they should be treated as read-only status reporting. No amount of clicking or dragging the slider will change the actual amount of fuel that's in the tank, etc.

Cloos suggested adding a new button type for this. Fundamentally, it should behave exactly like a slider, but it should ignore click-and-drag operations, and it should provide handling options for taps that are similar to other modes for the buttons/icons/sub-buttons.