Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update media_player.py #46

Merged
merged 2 commits into from
Jun 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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