lovelace-mushroom
lovelace-mushroom copied to clipboard
[Feature]: Enable to set the min/max volume of the slider
Is your feature request related to a problem?
The volume scale is fixed at 0-100, while media players handle this differently. E.g. Neither my TV or amplifier works on a 0-100 scale. My TV starts at 0 and high volume is about 12. My amplifier has a normal level of about 40 and 65 is almost unbearably loud. The current scale makes it very easy to set a way too high volume for a device. Potentially even damaging the device.
Describe the solution you'd like
If I could set the Min/max value of the slider I wouldn't have to worry as much about accidentally setting the volume to a way to high level. it would also be nice to set the volume step per device/card like in mini media player.
https://github.com/kalkih/mini-media-player offers these settings:
volume_step | number | optional | v1.9.0 | Change the volume step size of the volume buttons and the volume slider (number between 1 - 100). |
---|---|---|---|---|
max_volume | number | optional | v0.8.2 | Specify the max vol limit of the volume slider (number between 1 - 100). |
min_volume | number | optional | v1.1.2 | Specify the min vol limit of the volume slider (number between 1 - 100). |
Describe alternatives you've considered
No response
Additional context
No response
Would also be great for the Light Dimmer-Slider. For example we have one light in the kids sleeping room which is dimmed to 1 at night - it's hard to hit the 1 on the mobile phone. So setting the min-Value to 1 for this slider would be a great improvement (this is also how the Hue-App is working .. dimming always to 1 and when you want to switch off completely you have to tap the On/Off Button).
#675
I actually came here to feature request this exact thing for the slider-cards.
This is the only reason I still use the mini-media-player instead. My TV is unbearably loud at 25%. I tried an automation that divides the TV volume by 4 if it's ever set above 0.25, but it's a horrible UI experience.
If you're reading this thread, you may want to know that you can use the Universal Media Player integration to create a replica custom media player entity with limited volume range, but it's all advanced YAML configuration and out of reach for many users.
Since @piitaya recently started working for Nabu Casa (congrats!), maybe he can convince the other devs to add built-in configurable volume limits for media_player entities so frontend developers don't have to worry about this 😉
Would also be great for the Light Dimmer-Slider. For example we have one light in the kids sleeping room which is dimmed to 1 at night - it's hard to hit the 1 on the mobile phone. So setting the min-Value to 1 for this slider would be a great improvement (this is also how the Hue-App is working .. dimming always to 1 and when you want to switch off completely you have to tap the On/Off Button).
Hi. I've done 2 things for that:
- Card's Tap action is toggle, but Doble tap action sets the light to 1%. Is a nice and fast workaround.
- Modified mushroom.js file to add
.min=${1}
to the light card. Check out issue 847 linked right above this comment. Warning: It seems to require switching from HACS installation to Manual installation, and of course manual maintenance, but it's okay and worth it for me personally.