mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Use enums in tractive (#62024)
This commit is contained in:
parent
087724d2f2
commit
ad778f53f7
@ -9,9 +9,9 @@ from aiotractive.exceptions import TractiveError
|
||||
|
||||
from homeassistant.components.switch import SwitchEntity, SwitchEntityDescription
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import ENTITY_CATEGORY_CONFIG
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
from homeassistant.helpers.entity import EntityCategory
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
from . import Trackables
|
||||
@ -50,21 +50,21 @@ SWITCH_TYPES: tuple[TractiveSwitchEntityDescription, ...] = (
|
||||
name="Tracker Buzzer",
|
||||
icon="mdi:volume-high",
|
||||
method="async_set_buzzer",
|
||||
entity_category=ENTITY_CATEGORY_CONFIG,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
TractiveSwitchEntityDescription(
|
||||
key=ATTR_LED,
|
||||
name="Tracker LED",
|
||||
icon="mdi:led-on",
|
||||
method="async_set_led",
|
||||
entity_category=ENTITY_CATEGORY_CONFIG,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
TractiveSwitchEntityDescription(
|
||||
key=ATTR_LIVE_TRACKING,
|
||||
name="Live Tracking",
|
||||
icon="mdi:map-marker-path",
|
||||
method="async_set_live_tracking",
|
||||
entity_category=ENTITY_CATEGORY_CONFIG,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user