Skip to content

Commit

Permalink
Merge pull request #46 from a-r-j-a-n/patch-1
Browse files Browse the repository at this point in the history
Update media_player.py
  • Loading branch information
roberodin authored Jun 26, 2020
2 parents d96ce14 + 6cc881f commit c891e29
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions custom_components/samsungtv_custom/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit c891e29

Please sign in to comment.