Set deviceclass to speaker for Sonos media_player (#80694)

This commit is contained in:
Michel van de Wetering 2023-01-16 20:20:37 +01:00 committed by GitHub
parent 7636477760
commit b087c1e734
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,6 +21,7 @@ from homeassistant.components.media_player import (
ATTR_INPUT_SOURCE,
ATTR_MEDIA_ENQUEUE,
BrowseMedia,
MediaPlayerDeviceClass,
MediaPlayerEnqueue,
MediaPlayerEntity,
MediaPlayerEntityFeature,
@ -205,6 +206,7 @@ class SonosMediaPlayerEntity(SonosEntity, MediaPlayerEntity):
| MediaPlayerEntityFeature.VOLUME_SET
)
_attr_media_content_type = MediaType.MUSIC
_attr_device_class = MediaPlayerDeviceClass.SPEAKER
def __init__(self, speaker: SonosSpeaker) -> None:
"""Initialize the media player entity."""