From b4c9d1844e546a571b8878c9748cd7d1adaa0d53 Mon Sep 17 00:00:00 2001 From: Robert Hillis Date: Thu, 16 Dec 2021 03:20:52 -0500 Subject: [PATCH] Use enums in webostv (#62000) --- homeassistant/components/webostv/media_player.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/webostv/media_player.py b/homeassistant/components/webostv/media_player.py index 60768b6857f..5c79942f279 100644 --- a/homeassistant/components/webostv/media_player.py +++ b/homeassistant/components/webostv/media_player.py @@ -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):