Use enums in webostv (#62000)

pull/62014/head^2
Robert Hillis 2021-12-16 03:20:52 -05:00 committed by GitHub
parent 868e5db47a
commit b4c9d1844e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -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):