Add device_class to Panasonic Viera media player entity (#41966)

pull/41976/head
João Gabriel 2020-10-16 17:13:27 -03:00 committed by GitHub
parent 7469bd9266
commit 554246f061
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -3,7 +3,7 @@ import logging
from panasonic_viera import Keys
from homeassistant.components.media_player import MediaPlayerEntity
from homeassistant.components.media_player import DEVICE_CLASS_TV, MediaPlayerEntity
from homeassistant.components.media_player.const import (
MEDIA_TYPE_URL,
SUPPORT_NEXT_TRACK,
@ -87,6 +87,11 @@ class PanasonicVieraTVEntity(MediaPlayerEntity):
"model": self._device_info[ATTR_MODEL_NUMBER],
}
@property
def device_class(self):
"""Return the device class of the device."""
return DEVICE_CLASS_TV
@property
def name(self):
"""Return the name of the device."""