2020-09-30 14:13:53 +00:00
|
|
|
"""Describe group states."""
|
|
|
|
|
2024-05-20 20:06:58 +00:00
|
|
|
from __future__ import annotations
|
|
|
|
|
2024-03-16 00:51:21 +00:00
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
|
2024-04-28 14:32:17 +00:00
|
|
|
from homeassistant.const import STATE_OFF, STATE_ON
|
2021-03-29 23:24:36 +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, HVACMode
|
2020-09-30 14:13:53 +00:00
|
|
|
|
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-05-20 20:06:58 +00:00
|
|
|
hass: HomeAssistant, registry: GroupIntegrationRegistry
|
2020-09-30 14:13:53 +00:00
|
|
|
) -> None:
|
|
|
|
"""Describe group on off states."""
|
|
|
|
registry.on_off_states(
|
2024-04-28 14:32:17 +00:00
|
|
|
DOMAIN,
|
|
|
|
{
|
|
|
|
STATE_ON,
|
|
|
|
HVACMode.HEAT,
|
|
|
|
HVACMode.COOL,
|
|
|
|
HVACMode.HEAT_COOL,
|
|
|
|
HVACMode.AUTO,
|
|
|
|
HVACMode.FAN_ONLY,
|
|
|
|
},
|
|
|
|
STATE_ON,
|
2020-09-30 14:13:53 +00:00
|
|
|
STATE_OFF,
|
|
|
|
)
|