1
mirror of https://github.com/home-assistant/core synced 2024-08-02 23:40:32 +02:00

Use enums in samsung_tv (#62047)

This commit is contained in:
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

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: