Use new enums in homekit-controller (#61689)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2021-12-13 17:04:21 +01:00 committed by GitHub
parent 3118bfdfab
commit 10f57cf1f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 50 additions and 66 deletions

View file

@ -10,7 +10,10 @@ from aiohomekit.model.characteristics import (
from aiohomekit.model.services import ServicesTypes
from aiohomekit.utils import clamp_enum_to_char
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 (
SUPPORT_PAUSE,
SUPPORT_PLAY,
@ -57,7 +60,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
class HomeKitTelevision(HomeKitEntity, MediaPlayerEntity):
"""Representation of a HomeKit Controller Television."""
_attr_device_class = DEVICE_CLASS_TV
_attr_device_class = MediaPlayerDeviceClass.TV
def get_characteristic_types(self):
"""Define the homekit characteristics the entity cares about."""