2020-09-30 14:13:53 +00:00
|
|
|
"""Describe group states."""
|
|
|
|
|
2024-03-16 00:51:21 +00:00
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
|
2024-05-08 18:42:22 +00:00
|
|
|
from homeassistant.const import (
|
|
|
|
STATE_LOCKED,
|
|
|
|
STATE_LOCKING,
|
|
|
|
STATE_OPEN,
|
|
|
|
STATE_OPENING,
|
|
|
|
STATE_UNLOCKED,
|
|
|
|
STATE_UNLOCKING,
|
|
|
|
)
|
2021-04-23 07:55:20 +00:00
|
|
|
from homeassistant.core import HomeAssistant, callback
|
2020-09-30 14:13:53 +00:00
|
|
|
|
2024-04-28 14:32:17 +00:00
|
|
|
from .const import DOMAIN
|
|
|
|
|
2024-03-16 00:51:21 +00:00
|
|
|
if TYPE_CHECKING:
|
|
|
|
from homeassistant.components.group import GroupIntegrationRegistry
|
|
|
|
|
2020-09-30 14:13:53 +00:00
|
|
|
|
|
|
|
@callback
|
|
|
|
def async_describe_on_off_states(
|
2024-03-16 00:51:21 +00:00
|
|
|
hass: HomeAssistant, registry: "GroupIntegrationRegistry"
|
2020-09-30 14:13:53 +00:00
|
|
|
) -> None:
|
|
|
|
"""Describe group on off states."""
|
2024-05-08 18:42:22 +00:00
|
|
|
registry.on_off_states(
|
|
|
|
DOMAIN,
|
|
|
|
{
|
|
|
|
STATE_LOCKING,
|
|
|
|
STATE_OPEN,
|
|
|
|
STATE_OPENING,
|
|
|
|
STATE_UNLOCKED,
|
|
|
|
STATE_UNLOCKING,
|
|
|
|
},
|
|
|
|
STATE_UNLOCKED,
|
|
|
|
STATE_LOCKED,
|
|
|
|
)
|