Nerwyn / android-tv-card

Universal Customizable TV Remote Card, with HA actions, super configurable touchpad, slider, haptics, and keyboard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adjust volume scale in slider

Sloy opened this issue · comments

First of all, I love this card. I've completely replaced my physical remote with this one.

Is your feature request related to a problem? Please describe.
How much volume do you usually put your TV on? Because I'm always between 10-30%. Maybe 50% in very low-volume media. So I end up aiming with my finger in a small portion of the volume slider to set the right value.

Describe the solution you'd like
So I would like to be able to change the scale of the slider, so it goes for example from 0% to 60%. The easiest solution I can think is to let the user set a "max value" on the slider config.

Describe alternatives you've considered
I've considered using some other kind of interpolation function so the slider is not linear. In other words, the first parts of the slider would be more sensitive, and the last parts would increment the volume less. But I think it would be harder to implement, calibrate and understand. Setting a max value seems good enough.

Additional context
If you think it's a good idea for this complement, I'd love to try implementing it myself. But I'd need some help with the naming of the feature and parameters 😅

You've got a really good point. I've actually just started another massive refactor and plan to completely replace the slider with one that doesn't depend on another custom card. I recently created a Home Assistant slider for my other project and plan to reuse much of the code. I'll keep this in mind when I get to rewriting the slider!

Ok, thank you! ❤️
Good luck with the huge refactor 🤞

Version three has a new option slider_range, which can be used to limit the range of the slider like so:

slider_range:
  - 0
  - 0.6

v3.0.0 released with slider_range and other slider customization options.

Nice! That's a great update. Thanks for squeezing in my request ❤
It took me some time understanding where to put the slider_range attribute, so maybe that's not 100% clear in the readme? But I get it, it was a huge job you did there. Congrats on the refactor 👏

I've added a small section on slider_range and updated one of the examples with styles and slider range which should hopefully make things more clear for future users.