Migrate AndroidTV to has entity name (#96572)

This commit is contained in:
Joost Lekkerkerker 2023-07-18 09:56:57 +02:00 committed by GitHub
parent 69bcba7ef5
commit 1097bde71b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -210,6 +210,8 @@ class ADBDevice(MediaPlayerEntity):
"""Representation of an Android or Fire TV device."""
_attr_device_class = MediaPlayerDeviceClass.TV
_attr_has_entity_name = True
_attr_name = None
def __init__(
self,
@ -222,7 +224,6 @@ class ADBDevice(MediaPlayerEntity):
) -> None:
"""Initialize the Android / Fire TV device."""
self.aftv = aftv
self._attr_name = name
self._attr_unique_id = unique_id
self._entry_id = entry_id
self._entry_data = entry_data