Add entity category to Tractive (#57720)
This commit is contained in:
parent
b0ff28ceb4
commit
e7e88d6a19
3 changed files with 8 additions and 1 deletions
|
@ -9,6 +9,7 @@ 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_platform import AddEntitiesCallback
|
||||
|
@ -49,18 +50,21 @@ SWITCH_TYPES: tuple[TractiveSwitchEntityDescription, ...] = (
|
|||
name="Tracker Buzzer",
|
||||
icon="mdi:volume-high",
|
||||
method="async_set_buzzer",
|
||||
entity_category=ENTITY_CATEGORY_CONFIG,
|
||||
),
|
||||
TractiveSwitchEntityDescription(
|
||||
key=ATTR_LED,
|
||||
name="Tracker LED",
|
||||
icon="mdi:led-on",
|
||||
method="async_set_led",
|
||||
entity_category=ENTITY_CATEGORY_CONFIG,
|
||||
),
|
||||
TractiveSwitchEntityDescription(
|
||||
key=ATTR_LIVE_TRACKING,
|
||||
name="Live Tracking",
|
||||
icon="mdi:map-marker-path",
|
||||
method="async_set_live_tracking",
|
||||
entity_category=ENTITY_CATEGORY_CONFIG,
|
||||
),
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue