mirror of
https://github.com/home-assistant/core.git
synced 2026-10-01 00:53:26 +01:00
50 lines
1.2 KiB
Python
50 lines
1.2 KiB
Python
"""Constants for the remote component."""
|
|
|
|
from enum import IntFlag, StrEnum
|
|
from typing import TYPE_CHECKING, Final
|
|
|
|
from homeassistant.util.hass_dict import HassKey
|
|
|
|
if TYPE_CHECKING:
|
|
from homeassistant.helpers.entity_component import EntityComponent
|
|
|
|
from . import RemoteEntity
|
|
|
|
DOMAIN: Final = "remote"
|
|
DATA_COMPONENT: HassKey[EntityComponent[RemoteEntity]] = HassKey(DOMAIN)
|
|
|
|
ATTR_ACTIVITY = "activity"
|
|
ATTR_ACTIVITY_LIST = "activity_list"
|
|
ATTR_CURRENT_ACTIVITY = "current_activity"
|
|
ATTR_COMMAND_TYPE = "command_type"
|
|
ATTR_DEVICE = "device"
|
|
ATTR_NUM_REPEATS = "num_repeats"
|
|
ATTR_DELAY_SECS = "delay_secs"
|
|
ATTR_HOLD_SECS = "hold_secs"
|
|
ATTR_ALTERNATIVE = "alternative"
|
|
ATTR_TIMEOUT = "timeout"
|
|
|
|
SERVICE_SEND_COMMAND = "send_command"
|
|
SERVICE_LEARN_COMMAND = "learn_command"
|
|
SERVICE_DELETE_COMMAND = "delete_command"
|
|
SERVICE_SYNC = "sync"
|
|
|
|
DEFAULT_NUM_REPEATS = 1
|
|
DEFAULT_DELAY_SECS = 0.4
|
|
DEFAULT_HOLD_SECS = 0
|
|
|
|
|
|
class RemoteEntityStateAttribute(StrEnum):
|
|
"""State attributes for remote entities."""
|
|
|
|
ACTIVITY_LIST = "activity_list"
|
|
CURRENT_ACTIVITY = "current_activity"
|
|
|
|
|
|
class RemoteEntityFeature(IntFlag):
|
|
"""Supported features of the remote entity."""
|
|
|
|
LEARN_COMMAND = 1
|
|
DELETE_COMMAND = 2
|
|
ACTIVITY = 4
|