Hi, I’m setting up HA to control a Denon AVR volume, I have configured it with denonavr, as media_player.denon, it is found by Alexa as a TV, and I’m using Nabu Casa cloud connection.
In the Alexa app I only see command to switch on/off, no volume commands.
Also, what would it be the Alexa command for it? I couldn’t find a guide about commanding media_player volume through Alexa, do I have to add scripts?
Alexa requires the “TV” to have the ability to set a volume. I.E. the device needs to report a volume level. If your device does not report a volume level, the volume will not be controllable in alexa. This is a restriction on the alexa side, not home assistant side.
If you’re feeling saucy. You can attempt to fake it out with the universal media player. This will require you to override the volume_set command. And the volume_level attribute. It would look something like this:
media_player:
- platform: universal
name: TV
children:
- media_player.denon
commands:
volume_set:
- service_template: >
{% set current = states('input_number.fake_denon_volume') | float %}
media_player.volume_{{ 'up' if volume_level - current > 0 else 'down' }}
data:
entity_id: media_player.denon
attributes:
volume_level: input_number.fake_denon_volume
This will most likely work but alexa might complain and say “The device isn’t responding” if she doesn’t see the volume_level update. If that’s the case, then you’ll need to jump through some hoops every time you restart home assistant. You’d use this universal media player and input_number:
I am facing the same problem with my onkyo avr. The integration creates a media_player device and I synced that one as TV to Alexa. When checking the attributes I can see a
volume_level: 0.4125
However, Alexa sais that the device does not support that.
Had the same thing working with Domoticz before. Any ideas?
I just exposed my recievers instead of the universal media_player. The problem with universal meda_player is that when your ‘child’ media_players are off, the supported features is zero. When they are zero, alexa thinks it can’t do anything.
One cherry on top might be to be able to set the absolute value and not the volume percentage, like 27 = 50%
I just added a receiver_max_volume: 100 and i am good to go
I’m guessing that those recievers don’t supply a volume level through the API and the integration has to use ‘assumed’ states. Either way, good thing you got it working with the base integration.
So I’ve checked the code of the universal media_player and it seems to report the right supported features now.
Also I’ve checked the supported features on my universal media_player exposed to Alexa. This is the number:
We can see that SUPPORT_VOLUME_SET (4), SUPPORT_VOLUME_STEP (1024) and SUPPORT_VOLUME_MUTE (8) are supported. However, Alexa still reports that the feature is unsupported when I try to act on anything related to volume on this media player.
My device is discovered as being a TV in Alexa and I’ve even run the discovery when the device was on to be sure it was discovered with the right capabilities by Alexa.
Is there anything I’m missing?
PS: There’s no native integration for my amplifier as it’s controlled over a serial interface through MQTT
what do the supported features look like when the device is off? I’d wager it drops to almost no supported features. IIRC, if discovered when off, it won’t work.