From 767cfdd6e88230950c0223f252d212b5245ee6bc Mon Sep 17 00:00:00 2001 From: a-r-j-a-n Date: Thu, 25 Jun 2020 21:31:22 +0200 Subject: [PATCH] Update media_player.py Changed MediaPlayerDevice to MediaPlayerEntity --- custom_components/samsungtv_custom/media_player.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/custom_components/samsungtv_custom/media_player.py b/custom_components/samsungtv_custom/media_player.py index 2f4fe02..427451e 100644 --- a/custom_components/samsungtv_custom/media_player.py +++ b/custom_components/samsungtv_custom/media_player.py @@ -12,7 +12,7 @@ import requests from homeassistant import util -from homeassistant.components.media_player import MediaPlayerDevice, PLATFORM_SCHEMA +from homeassistant.components.media_player import MediaPlayerEntity, PLATFORM_SCHEMA from homeassistant.components.media_player.const import ( MEDIA_TYPE_CHANNEL, SUPPORT_NEXT_TRACK, @@ -149,7 +149,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): @@ -359,7 +359,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): @@ -692,7 +692,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):