Skip to content

Commit c891e29

Browse files
authored
Merge pull request #46 from a-r-j-a-n/patch-1
Update media_player.py
2 parents d96ce14 + 6cc881f commit c891e29

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

custom_components/samsungtv_custom/media_player.py

+4-8
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@
1212
import requests
1313

1414
from homeassistant import util
15-
from homeassistant.components.media_player import (
16-
MediaPlayerDevice,
17-
PLATFORM_SCHEMA,
18-
DEVICE_CLASS_TV,
19-
)
15+
from homeassistant.components.media_player import MediaPlayerEntity, PLATFORM_SCHEMA
2016
from homeassistant.components.media_player.const import (
2117
MEDIA_TYPE_CHANNEL,
2218
SUPPORT_NEXT_TRACK,
@@ -157,7 +153,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
157153
_LOGGER.info("Ignoring duplicate Samsung TV %s:%d", host, port)
158154

159155

160-
class SamsungTVDevice(MediaPlayerDevice):
156+
class SamsungTVDevice(MediaPlayerEntity):
161157
"""Representation of a Samsung TV."""
162158

163159
def __init__(self, host, port, name, timeout, mac, uuid, sourcelist, protocol, token):
@@ -394,7 +390,7 @@ async def async_select_source(self, source):
394390
await self.hass.async_add_job(self.send_key, self._sourcelist[source])
395391

396392

397-
class SamsungTVDeviceQLED(MediaPlayerDevice):
393+
class SamsungTVDeviceQLED(MediaPlayerEntity):
398394
"""Representation of a Samsung TV."""
399395

400396
def __init__(self, host, port, name, timeout, mac, uuid, sourcelist, applist):
@@ -732,7 +728,7 @@ def async_select_source(self, source):
732728
return self.hass.async_add_job(self.select_source, source)
733729

734730

735-
class SamsungTVDeviceWS(MediaPlayerDevice):
731+
class SamsungTVDeviceWS(MediaPlayerEntity):
736732
"""Representation of a Samsung TV."""
737733

738734
def __init__(self, host, port, name, timeout, mac, uuid, sourcelist):

0 commit comments

Comments
 (0)