Use enums for Panasonic Viera (#62062)

This commit is contained in:
Robert Hillis
2021-12-16 09:29:45 -05:00
committed by GitHub
parent c8607b1a4c
commit 6083b56139

View File

@@ -5,7 +5,10 @@ import logging
from panasonic_viera import Keys
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_URL,
SUPPORT_NEXT_TRACK,
@@ -95,7 +98,7 @@ class PanasonicVieraTVEntity(MediaPlayerEntity):
@property
def device_class(self):
"""Return the device class of the device."""
return DEVICE_CLASS_TV
return MediaPlayerDeviceClass.TV
@property
def name(self):