home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.66k stars 30.8k forks source link

[mediaplayer, frontier_silicon.py] volume_set range is 0-1, but 1 is minimal volume for Hama IR110 #11894

Closed RalfJahns closed 6 years ago

RalfJahns commented 6 years ago

Hello,

I want to switch on my internet radio in the early morning with limited volume. Because it is possible, that it was switched off with higher volume the day before, I want to set the volume immediately after switch on.

If I set volume 0 -> it works, radio shows on the display, that it is muted If I set volume 1 -> it works, radio shows volume 1 on the display. This is the minimum volume, so nearly not audible.

If I set higher volume than 1 -> nothing happens, radio shows no reaction. I guess this is, because the mediaplayer only takes float values between 0 and 1 (example is in this range: 0.6)? So set_volume is not usable for my Hama IR110 internet radio.

https://github.com/flammy/fsapi/ $response = $Radio->volume(5);

config_validation.py small_float = vol.All(vol.Coerce(float), vol.Range(min=0, max=1))

media_player/init.py MEDIA_PLAYER_SET_VOLUME_SCHEMA = MEDIA_PLAYER_SCHEMA.extend({ vol.Required(ATTR_MEDIA_VOLUME_LEVEL): cv.small_float, })

SERVICE_VOLUME_SET: {
    'method': 'async_set_volume_level',

'schema': MEDIA_PLAYER_SET_VOLUME_SCHEMA},

IMHO In frontier_silicon.py should get netRemote.sys.caps.volumeSteps and calculate the right value.

Best regards Ralf Jahns

balloobbot commented 6 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

balloobbot commented 6 years ago

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍