mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 11:47:06 +00:00
Use enums in webostv (#62000)
This commit is contained in:
parent
868e5db47a
commit
b4c9d1844e
@ -9,7 +9,10 @@ from aiopylgtv import PyLGTVCmdException, PyLGTVPairException, WebOsClient
|
|||||||
from websockets.exceptions import ConnectionClosed
|
from websockets.exceptions import ConnectionClosed
|
||||||
|
|
||||||
from homeassistant import util
|
from homeassistant import util
|
||||||
from homeassistant.components.media_player import DEVICE_CLASS_TV, MediaPlayerEntity
|
from homeassistant.components.media_player import (
|
||||||
|
MediaPlayerDeviceClass,
|
||||||
|
MediaPlayerEntity,
|
||||||
|
)
|
||||||
from homeassistant.components.media_player.const import (
|
from homeassistant.components.media_player.const import (
|
||||||
MEDIA_TYPE_CHANNEL,
|
MEDIA_TYPE_CHANNEL,
|
||||||
SUPPORT_NEXT_TRACK,
|
SUPPORT_NEXT_TRACK,
|
||||||
@ -239,7 +242,7 @@ class LgWebOSMediaPlayerEntity(MediaPlayerEntity):
|
|||||||
@property
|
@property
|
||||||
def device_class(self):
|
def device_class(self):
|
||||||
"""Return the device class of the device."""
|
"""Return the device class of the device."""
|
||||||
return DEVICE_CLASS_TV
|
return MediaPlayerDeviceClass.TV
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def state(self):
|
def state(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user