From 560e0cc7e0c759adba3b7ad16fbb72e67794e67d Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Mon, 17 Jul 2023 17:47:47 +0200 Subject: [PATCH] Migrate VLC Telnet to has entity naming (#96774) * Migrate VLC Telnet to has entity naming * Remove unused variable --- homeassistant/components/vlc_telnet/media_player.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/vlc_telnet/media_player.py b/homeassistant/components/vlc_telnet/media_player.py index 80b9d75303b..14728c05e53 100644 --- a/homeassistant/components/vlc_telnet/media_player.py +++ b/homeassistant/components/vlc_telnet/media_player.py @@ -70,6 +70,8 @@ def catch_vlc_errors( class VlcDevice(MediaPlayerEntity): """Representation of a vlc player.""" + _attr_has_entity_name = True + _attr_name = None _attr_media_content_type = MediaType.MUSIC _attr_supported_features = ( MediaPlayerEntityFeature.CLEAR_PLAYLIST @@ -91,7 +93,6 @@ class VlcDevice(MediaPlayerEntity): ) -> None: """Initialize the vlc device.""" self._config_entry = config_entry - self._name = name self._volume: float | None = None self._muted: bool | None = None self._media_position_updated_at: datetime | None = None @@ -183,11 +184,6 @@ class VlcDevice(MediaPlayerEntity): if self._media_title and (pos := self._media_title.find("?authSig=")) != -1: self._media_title = self._media_title[:pos] - @property - def name(self) -> str: - """Return the name of the device.""" - return self._name - @property def available(self) -> bool: """Return True if entity is available."""