Migrate Volumio to has entity naming (#96822)
parent
b9f92b526b
commit
5f0e5b7e0c
|
@ -49,6 +49,8 @@ async def async_setup_entry(
|
|||
class Volumio(MediaPlayerEntity):
|
||||
"""Volumio Player Object."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
_attr_media_content_type = MediaType.MUSIC
|
||||
_attr_supported_features = (
|
||||
MediaPlayerEntityFeature.PAUSE
|
||||
|
@ -89,11 +91,6 @@ class Volumio(MediaPlayerEntity):
|
|||
"""Return the unique id for the entity."""
|
||||
return self._uid
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""Return the name of the entity."""
|
||||
return self._name
|
||||
|
||||
@property
|
||||
def device_info(self) -> DeviceInfo:
|
||||
"""Return device info for this device."""
|
||||
|
@ -101,7 +98,7 @@ class Volumio(MediaPlayerEntity):
|
|||
identifiers={(DOMAIN, self.unique_id)},
|
||||
manufacturer="Volumio",
|
||||
model=self._info["hardware"],
|
||||
name=self.name,
|
||||
name=self._name,
|
||||
sw_version=self._info["systemversion"],
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue