diff --git a/custom_components/samsungtv_custom/media_player.py b/custom_components/samsungtv_custom/media_player.py index 4e712f8..598a2c2 100644 --- a/custom_components/samsungtv_custom/media_player.py +++ b/custom_components/samsungtv_custom/media_player.py @@ -12,11 +12,7 @@ import requests from homeassistant import util -from homeassistant.components.media_player import ( - MediaPlayerDevice, - PLATFORM_SCHEMA, - DEVICE_CLASS_TV, -) +from homeassistant.components.media_player import MediaPlayerEntity, PLATFORM_SCHEMA from homeassistant.components.media_player.const import ( MEDIA_TYPE_CHANNEL, SUPPORT_NEXT_TRACK, @@ -157,7 +153,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None): _LOGGER.info("Ignoring duplicate Samsung TV %s:%d", host, port) -class SamsungTVDevice(MediaPlayerDevice): +class SamsungTVDevice(MediaPlayerEntity): """Representation of a Samsung TV.""" def __init__(self, host, port, name, timeout, mac, uuid, sourcelist, protocol, token): @@ -394,7 +390,7 @@ async def async_select_source(self, source): await self.hass.async_add_job(self.send_key, self._sourcelist[source]) -class SamsungTVDeviceQLED(MediaPlayerDevice): +class SamsungTVDeviceQLED(MediaPlayerEntity): """Representation of a Samsung TV.""" def __init__(self, host, port, name, timeout, mac, uuid, sourcelist, applist): @@ -732,7 +728,7 @@ def async_select_source(self, source): return self.hass.async_add_job(self.select_source, source) -class SamsungTVDeviceWS(MediaPlayerDevice): +class SamsungTVDeviceWS(MediaPlayerEntity): """Representation of a Samsung TV.""" def __init__(self, host, port, name, timeout, mac, uuid, sourcelist):