1
0
mirror of https://github.com/home-assistant/core.git synced 2026-05-26 10:15:33 +01:00
Files
core/homeassistant/components/climate/group.py
T
J. Nick Koston b26928878f Remove group integration platforms that use the default states (#113562)
Remove group integration platforms that use the default

There is no need to register platforms that use the defaults
as the group code already uses STATE_ON/STATE_OFF when there
are no on/off states in the GroupIntegrationRegistry
2024-03-15 20:51:21 -04:00

23 lines
547 B
Python

"""Describe group states."""
from typing import TYPE_CHECKING
from homeassistant.const import STATE_OFF
from homeassistant.core import HomeAssistant, callback
from .const import HVAC_MODES, HVACMode
if TYPE_CHECKING:
from homeassistant.components.group import GroupIntegrationRegistry
@callback
def async_describe_on_off_states(
hass: HomeAssistant, registry: "GroupIntegrationRegistry"
) -> None:
"""Describe group on off states."""
registry.on_off_states(
set(HVAC_MODES) - {HVACMode.OFF},
STATE_OFF,
)