mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Use enums in samsung_tv (#62047)
This commit is contained in:
parent
fa522fc504
commit
395fa6d15f
@ -8,7 +8,10 @@ from typing import Any
|
|||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
from wakeonlan import send_magic_packet
|
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 (
|
from homeassistant.components.media_player.const import (
|
||||||
MEDIA_TYPE_CHANNEL,
|
MEDIA_TYPE_CHANNEL,
|
||||||
SUPPORT_NEXT_TRACK,
|
SUPPORT_NEXT_TRACK,
|
||||||
@ -104,7 +107,7 @@ class SamsungTVDevice(MediaPlayerEntity):
|
|||||||
self._attr_state: str | None = None
|
self._attr_state: str | None = None
|
||||||
self._attr_unique_id = config_entry.unique_id
|
self._attr_unique_id = config_entry.unique_id
|
||||||
self._attr_is_volume_muted: bool = False
|
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)
|
self._attr_source_list = list(SOURCES)
|
||||||
|
|
||||||
if self._on_script or self._mac:
|
if self._on_script or self._mac:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user