Closed treydock closed 4 years ago
Thanks. Can you confirm the affected echo dot actually is displaying media info? The error is reporting the volume_level
doesn't exist which may mean the echo dot isn't reporting any information so other things should be broken.
You can see this under Developer Tools -> States.
Please also confirm this isn't happening while you're playing through an Alexa group.
Under states there is state for this device:
is_volume_muted: false
media_content_type: standby
media_position_updated_at: '2019-12-24T22:59:11.677625+00:00'
source: Local Speaker
source_list:
- Local Speaker
available: true
last_called: true
friendly_name: Upstairs Echo Dot
supported_features: 56253
I was trying to adjust the volume of the device for notifications, does the volume only work when actually playing media?
No, it should work. However, the fact it doesn't have a volume_level
is strange. Does the media player show anything when you play music on it?
Looking at this closer, the error is coming from HA and not from the custom_component. The standard HA media player requires the volume_level
to be set before a volume command will work.
However, there is a case where the volume level may not be known yet by the component because it hasn't received any volume info from a device. This can happen if the device has never reported its volume through a websocket update, has never played media that reports volume while the component was running. (i.e., Amazon music gives volume while Spotify doesn't.) We can probably set a default volume and not clear out volume data moving forward.
I was looking about a similar problem so I've read this that's actual even now in 2021. When HA restarts volume of all my Echo Dot devices go to 0. Inspecting the state of the entities this is the result:
source_list:
- Local Speaker
is_volume_muted: false
media_content_type: standby
media_position_updated_at: '2021-10-31T11:30:09.199819+00:00'
source: Local Speaker
available: true
last_called: false
last_called_timestamp: null
last_called_summary: null
connected_bluetooth: null
bluetooth_list: []
friendly_name: Alexa mansarda
supported_features: 56253
As you see I'm missing the volume_level too. And it remains so until I change the volume explicitly using HA.
So the question is: isn't there a way to detect the current volume_level when Home Assistant starts? Possibly in your integration but even a workaround that I can trigget at start to let Amazon send the volume_level of my devices will be ok. Is there something I can do to force a volume_level refresh? Otherwise I'll be forced to set a volume level when HA starts.... :(
I have the same problem when restart home assistant, volume_level is missing
Me too. Same problem
Describe the bug A clear and concise description of what the bug is.
Exception:
Full trace:
To Reproduce Steps to reproduce the behavior:
media_player.volume_up
media_player.upstrairs_echo_dot
entity_id: media_player.upstairs_echo_dot
Expected behavior Be able to adjust volume
System details
const.py
or HA startup): v2.3.6 of integration via HACSpip show alexapy
or HA startup): v2.3.6 of integration via HACS