Use enums for Panasonic Viera (#62062)

pull/62091/head
Robert Hillis 2021-12-16 09:29:45 -05:00 committed by GitHub
parent c8607b1a4c
commit 6083b56139
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

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