Use enums in webostv (#62000)
parent
868e5db47a
commit
b4c9d1844e
|
@ -9,7 +9,10 @@ from aiopylgtv import PyLGTVCmdException, PyLGTVPairException, WebOsClient
|
|||
from websockets.exceptions import ConnectionClosed
|
||||
|
||||
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 (
|
||||
MEDIA_TYPE_CHANNEL,
|
||||
SUPPORT_NEXT_TRACK,
|
||||
|
@ -239,7 +242,7 @@ class LgWebOSMediaPlayerEntity(MediaPlayerEntity):
|
|||
@property
|
||||
def device_class(self):
|
||||
"""Return the device class of the device."""
|
||||
return DEVICE_CLASS_TV
|
||||
return MediaPlayerDeviceClass.TV
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
|
|
Loading…
Reference in New Issue