Add entity category to Tractive (#57720)

This commit is contained in:
Maciej Bieniek 2021-10-15 02:46:25 +02:00 committed by GitHub
parent b0ff28ceb4
commit e7e88d6a19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View file

@ -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,
),
)