mirror of
https://github.com/home-assistant/core.git
synced 2026-10-02 02:15:32 +01:00
52 lines
1.2 KiB
Python
52 lines
1.2 KiB
Python
"""Provides the constants needed for the component."""
|
|
|
|
from enum import StrEnum
|
|
from typing import Final
|
|
|
|
DOMAIN: Final = "event"
|
|
|
|
ATTR_EVENT_TYPE = "event_type"
|
|
ATTR_EVENT_TYPES = "event_types"
|
|
ATTR_MULTI_PRESS_COUNT = "multi_press_count"
|
|
|
|
|
|
class EventEntityCapabilityAttribute(StrEnum):
|
|
"""Capability attributes for event entities."""
|
|
|
|
EVENT_TYPES = "event_types"
|
|
|
|
|
|
class EventEntityStateAttribute(StrEnum):
|
|
"""State attributes for event entities."""
|
|
|
|
EVENT_TYPE = "event_type"
|
|
|
|
|
|
class DoorbellEventType(StrEnum):
|
|
"""Standard event types for doorbell device class."""
|
|
|
|
RING = "ring"
|
|
|
|
|
|
class ButtonEventType(StrEnum):
|
|
"""Standard event types for button device class.
|
|
|
|
None of these are mandatory: integrations map only the
|
|
interactions their hardware can actually produce.
|
|
"""
|
|
|
|
PRESS_START = "press_start"
|
|
PRESS_END = "press_end"
|
|
LONG_PRESS_START = "long_press_start"
|
|
LONG_PRESS_END = "long_press_end"
|
|
MULTI_PRESS_ONGOING = "multi_press_ongoing"
|
|
MULTI_PRESS_END = "multi_press_end"
|
|
|
|
|
|
class EventDeviceClass(StrEnum):
|
|
"""Device class for events."""
|
|
|
|
DOORBELL = "doorbell"
|
|
BUTTON = "button"
|
|
MOTION = "motion"
|