Migrate Spotify to new entity naming style (#74992)

This commit is contained in:
Franck Nijhof 2022-07-11 18:12:56 +02:00 committed by GitHub
parent 7e0515b119
commit 964bb63da6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -107,10 +107,11 @@ def spotify_exception_handler(func):
class SpotifyMediaPlayer(MediaPlayerEntity):
"""Representation of a Spotify controller."""
_attr_entity_registry_enabled_default = False
_attr_has_entity_name = True
_attr_icon = "mdi:spotify"
_attr_media_content_type = MEDIA_TYPE_MUSIC
_attr_media_image_remotely_accessible = False
_attr_entity_registry_enabled_default = False
def __init__(
self,
@ -122,7 +123,6 @@ class SpotifyMediaPlayer(MediaPlayerEntity):
self._id = user_id
self.data = data
self._attr_name = f"Spotify {name}"
self._attr_unique_id = user_id
if self.data.current_user["product"] == "premium":