hass-core/homeassistant/components/device_tracker/group.py
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

17 lines
485 B
Python

"""Describe group states."""
from typing import TYPE_CHECKING
from homeassistant.const import STATE_HOME, STATE_NOT_HOME
from homeassistant.core import HomeAssistant, callback
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({STATE_HOME}, STATE_NOT_HOME)