I’m having an interesting dilemma and I’ve decided to spit ball some ideas. Maybe you guys can think of something that I have not.
The problem
My physical receiver displays decibels for volume. I cannot change this. The range is -80dB to 25dB but I personally never go above 0dB but that’s besides the point.
The created media_player volume range is 0 to 1, like all media_players in home assistant.
I want to control my through voice commands through Alexa. She has 3 phrases to invoke volume commands:
Alexa, turn up the {x} volume
Alexa, turn down the {x} volume
Alexa, set the {x} volume to {level}
When you use all 3 commands, alexa ‘under the hood’ uses her own version of ‘set_volume’. She does not use a ‘volume up’ or ‘volume down’ command. So when you link her up to home assistant, she’s only using the ‘set_volume’ service. For volume up or down, she gets the current volume level and changes it by 10% in the commanded direction.
So the problem is, I cannot use all 3 commands as intended.
If I leave the volume control as is from a media player, volume up and volume down work as expected. But when I use set volume, it’s inverted. For example, if I say ‘Alexa, set the tv volume to 40’, she will set it to -60db. The levels are essentially inverted because my reciever’s range is negative instead of positive.
If I invert the volume. Everything is opposite. The volume up and down go awol due to state miss matches (whole different problem), but volume set will work. I.E. I can say ‘Alexa, set the tv volume to 40’ and she will set it to -40.
At this point I have a few ideas on how to fix this but I don’t like any of them because they don’t provide a single solution.
Anyone have other ideas I can try? Trying to think outside the box and I’m not getting anywhere with it.