mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 15:47:12 +00:00
Migrate Songpal to has entity name (#96753)
This commit is contained in:
parent
faa67a40c4
commit
c253549e68
@ -100,6 +100,8 @@ class SongpalEntity(MediaPlayerEntity):
|
||||
| MediaPlayerEntityFeature.TURN_ON
|
||||
| MediaPlayerEntityFeature.TURN_OFF
|
||||
)
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
|
||||
def __init__(self, name, device):
|
||||
"""Init."""
|
||||
@ -197,11 +199,6 @@ class SongpalEntity(MediaPlayerEntity):
|
||||
|
||||
self.hass.loop.create_task(self._dev.listen_notifications())
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""Return name of the device."""
|
||||
return self._name
|
||||
|
||||
@property
|
||||
def unique_id(self):
|
||||
"""Return a unique ID."""
|
||||
@ -220,7 +217,7 @@ class SongpalEntity(MediaPlayerEntity):
|
||||
identifiers={(DOMAIN, self.unique_id)},
|
||||
manufacturer="Sony Corporation",
|
||||
model=self._model,
|
||||
name=self.name,
|
||||
name=self._name,
|
||||
sw_version=self._sysinfo.version,
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user