Migrate Soundtouch to has entity name (#96754)

pull/96818/head
Joost Lekkerkerker 2023-07-18 09:54:50 +02:00 committed by GitHub
parent 43842e243d
commit 5cea0bb3de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -73,6 +73,8 @@ class SoundTouchMediaPlayer(MediaPlayerEntity):
| MediaPlayerEntityFeature.BROWSE_MEDIA | MediaPlayerEntityFeature.BROWSE_MEDIA
) )
_attr_device_class = MediaPlayerDeviceClass.SPEAKER _attr_device_class = MediaPlayerDeviceClass.SPEAKER
_attr_has_entity_name = True
_attr_name = None
def __init__(self, device: SoundTouchDevice) -> None: def __init__(self, device: SoundTouchDevice) -> None:
"""Create SoundTouch media player entity.""" """Create SoundTouch media player entity."""
@ -80,7 +82,6 @@ class SoundTouchMediaPlayer(MediaPlayerEntity):
self._device = device self._device = device
self._attr_unique_id = self._device.config.device_id self._attr_unique_id = self._device.config.device_id
self._attr_name = self._device.config.name
self._attr_device_info = DeviceInfo( self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, self._device.config.device_id)}, identifiers={(DOMAIN, self._device.config.device_id)},
connections={ connections={