Use enums in samsung_tv (#62047)

pull/62130/head
Robert Hillis 2021-12-16 08:57:06 -05:00 committed by GitHub
parent fa522fc504
commit 395fa6d15f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -8,7 +8,10 @@ from typing import Any
import voluptuous as vol
from wakeonlan import send_magic_packet
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,
@ -104,7 +107,7 @@ class SamsungTVDevice(MediaPlayerEntity):
self._attr_state: str | None = None
self._attr_unique_id = config_entry.unique_id
self._attr_is_volume_muted: bool = False
self._attr_device_class = DEVICE_CLASS_TV
self._attr_device_class = MediaPlayerDeviceClass.TV
self._attr_source_list = list(SOURCES)
if self._on_script or self._mac: