Nerwyn / android-tv-card

Universal Customizable TV Remote Card, with HA actions, super configurable touchpad, slider, haptics, and keyboard
Apache License 2.0
183 stars 9 forks source link

Please Help for Volume Slider Bug #92

Closed muktheo closed 3 weeks ago

muktheo commented 1 month ago

Hi, it seems my volume slider has a little bug. Everytime I change the slide value, it will come back to the center. The volume has changed normally but not the slider.

bytheway Ive been using your incredible works for long time, and I notice that im still using old config like media_player instead of slider_id, adb_id, etc. but even after change it to slider_id or the newest, the bug still there.

thank you

remote_id: remote.tv_ruang_tamu #android tv remote
keyboard_id: media_player.android_tv_192_168_2_92 #adb
slider_id: media_player.tv_ruang_tamu_gcast #google cast
rows:
  - - power
    - keyboard
    - search
  - - back
    - home
    - tv
  - - youtube
    - spotify
    - netflix
  - - navigation_touchpad
  - - slider
  - - channel_up
    - channel_down
    - info
  - - rewind
    - play
    - pause
    - fast_forward
button_style:
  '--size': 62px
  color: '#00ccff'
touchpad_style:
  height: 250px

image

Nerwyn commented 1 month ago

Which version are you on? I accidentally introduced a bug that causes this in 3.7.1 but fixed it in 3.7.2. Also use three backticks ``` for code blocks and one backtick for inline code.

muktheo commented 1 month ago

I'm on 3.7.4 version right now. And thank you for reminding about block ticks

Nerwyn commented 1 month ago

Can you try clearing browser cache? It really does sound like the 3.7.1 bug which is fixed.

What about adding this to your config to debug?

  slider:
    style:
      '--color': hsl(211, {{ value * 100 }}%, {{ value * 100 }}%)
      '--value': '{{ value }}'

With this config does the color change as you move the slider? Does it also revert color? Can you open the browser developer tools, select the slider, and see the value of --value change and revert?

mikekornikh commented 4 weeks ago

I have the same issue! Started after one of the more recent updates. That code above didn't help. The bar snaps back to 50% (Center)

mikekornikh commented 4 weeks ago

Oh, and I double checked the media player entity and it's showing the correct volume level percentage

Nerwyn commented 4 weeks ago

The config above isn't supposed to help, just give more visibility into and help diagnose what's going on. Did y'all clear cache? This should already be fixed, but I'll look into and modify the slider config setting code in the 3.8.0 beta to see if I can identify anything else that could be causing it.

mikekornikh commented 4 weeks ago

The config above isn't supposed to help, just give more visibility into and help diagnose what's going on. Did y'all clear cache? This should already be fixed, but I'll look into and modify the slider config setting code in the 3.8.0 beta to see if I can identify anything else that could be causing it.

yup, cleared cache, still rebounds back to 50%,. The same thing happens in Android and iPhone apps too.

Nerwyn commented 4 weeks ago

What version are you on? Can you try the latest release version or 3.8.0 beta? What's your remote config?

mk89pwnz commented 4 weeks ago

I also have the same problem with 3.8.0-beta.007, it controls webos volume level bet gets back to center after some time or when I refresh the page.

Nerwyn commented 4 weeks ago

Can y'all try the latest beta again? I think I've identified and fixed the issue, and @muktheo's config is now working for me.

muktheo commented 4 weeks ago

Can y'all try the latest beta again? I think I've identified and fixed the issue, and @muktheo's config is now working for me.

great, confirm the slider working normally on latest beta.

thanks so much for you hardwork

Nerwyn commented 4 weeks ago

Sorry it took me a bit to get to fixing it. As new features get added, fields get changed, and things get deprecated the chances I break deprecated config support increases and becomes more difficult to troubleshoot.

mikekornikh commented 4 weeks ago

The beta worked for me too! Thank you so much!

Nerwyn commented 3 weeks ago

Fixed sliders when only slider ID is provided in 3.8.0