From c253549e6883fc8c62aeb5b77d1c415d844f5629 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Tue, 18 Jul 2023 12:38:17 +0200 Subject: [PATCH] Migrate Songpal to has entity name (#96753) --- homeassistant/components/songpal/media_player.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/songpal/media_player.py b/homeassistant/components/songpal/media_player.py index 0d41aec699b..bc5e15ba989 100644 --- a/homeassistant/components/songpal/media_player.py +++ b/homeassistant/components/songpal/media_player.py @@ -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, )