|
12 | 12 | import requests
|
13 | 13 |
|
14 | 14 | 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 |
20 | 16 | from homeassistant.components.media_player.const import (
|
21 | 17 | MEDIA_TYPE_CHANNEL,
|
22 | 18 | SUPPORT_NEXT_TRACK,
|
@@ -157,7 +153,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
157 | 153 | _LOGGER.info("Ignoring duplicate Samsung TV %s:%d", host, port)
|
158 | 154 |
|
159 | 155 |
|
160 |
| -class SamsungTVDevice(MediaPlayerDevice): |
| 156 | +class SamsungTVDevice(MediaPlayerEntity): |
161 | 157 | """Representation of a Samsung TV."""
|
162 | 158 |
|
163 | 159 | def __init__(self, host, port, name, timeout, mac, uuid, sourcelist, protocol, token):
|
@@ -394,7 +390,7 @@ async def async_select_source(self, source):
|
394 | 390 | await self.hass.async_add_job(self.send_key, self._sourcelist[source])
|
395 | 391 |
|
396 | 392 |
|
397 |
| -class SamsungTVDeviceQLED(MediaPlayerDevice): |
| 393 | +class SamsungTVDeviceQLED(MediaPlayerEntity): |
398 | 394 | """Representation of a Samsung TV."""
|
399 | 395 |
|
400 | 396 | def __init__(self, host, port, name, timeout, mac, uuid, sourcelist, applist):
|
@@ -732,7 +728,7 @@ def async_select_source(self, source):
|
732 | 728 | return self.hass.async_add_job(self.select_source, source)
|
733 | 729 |
|
734 | 730 |
|
735 |
| -class SamsungTVDeviceWS(MediaPlayerDevice): |
| 731 | +class SamsungTVDeviceWS(MediaPlayerEntity): |
736 | 732 | """Representation of a Samsung TV."""
|
737 | 733 |
|
738 | 734 | def __init__(self, host, port, name, timeout, mac, uuid, sourcelist):
|
|
0 commit comments