mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
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
This commit is contained in:
parent
af06e03b71
commit
b26928878f
@ -1,12 +1,16 @@
|
||||
"""Describe group states."""
|
||||
|
||||
from homeassistant.components.group import GroupIntegrationRegistry
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
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
|
||||
hass: HomeAssistant, registry: "GroupIntegrationRegistry"
|
||||
) -> None:
|
||||
"""Describe group on off states."""
|
||||
registry.exclude_domain()
|
||||
|
@ -1,6 +1,8 @@
|
||||
"""Describe group states."""
|
||||
|
||||
from homeassistant.components.group import GroupIntegrationRegistry
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from homeassistant.const import (
|
||||
STATE_ALARM_ARMED_AWAY,
|
||||
STATE_ALARM_ARMED_CUSTOM_BYPASS,
|
||||
@ -12,10 +14,13 @@ from homeassistant.const import (
|
||||
)
|
||||
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
|
||||
hass: HomeAssistant, registry: "GroupIntegrationRegistry"
|
||||
) -> None:
|
||||
"""Describe group on off states."""
|
||||
registry.on_off_states(
|
||||
|
@ -28,8 +28,6 @@ from homeassistant.helpers.entity import Entity, EntityDescription
|
||||
from homeassistant.helpers.entity_component import EntityComponent
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
|
||||
from . import group as group_pre_import # noqa: F401
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from functools import cached_property
|
||||
else:
|
||||
|
@ -1,13 +0,0 @@
|
||||
"""Describe group states."""
|
||||
|
||||
from homeassistant.components.group import GroupIntegrationRegistry
|
||||
from homeassistant.const import STATE_OFF, STATE_ON
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
|
||||
|
||||
@callback
|
||||
def async_describe_on_off_states(
|
||||
hass: HomeAssistant, registry: GroupIntegrationRegistry
|
||||
) -> None:
|
||||
"""Describe group on off states."""
|
||||
registry.on_off_states({STATE_ON}, STATE_OFF)
|
@ -1,15 +1,19 @@
|
||||
"""Describe group states."""
|
||||
|
||||
from homeassistant.components.group import GroupIntegrationRegistry
|
||||
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
|
||||
hass: HomeAssistant, registry: "GroupIntegrationRegistry"
|
||||
) -> None:
|
||||
"""Describe group on off states."""
|
||||
registry.on_off_states(
|
||||
|
@ -1,13 +1,17 @@
|
||||
"""Describe group states."""
|
||||
|
||||
from homeassistant.components.group import GroupIntegrationRegistry
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from homeassistant.const import STATE_CLOSED, STATE_OPEN
|
||||
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
|
||||
hass: HomeAssistant, registry: "GroupIntegrationRegistry"
|
||||
) -> None:
|
||||
"""Describe group on off states."""
|
||||
# On means open, Off means closed
|
||||
|
@ -1,13 +1,17 @@
|
||||
"""Describe group states."""
|
||||
|
||||
from homeassistant.components.group import GroupIntegrationRegistry
|
||||
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
|
||||
hass: HomeAssistant, registry: "GroupIntegrationRegistry"
|
||||
) -> None:
|
||||
"""Describe group on off states."""
|
||||
registry.on_off_states({STATE_HOME}, STATE_NOT_HOME)
|
||||
|
@ -40,8 +40,6 @@ from homeassistant.util.percentage import (
|
||||
ranged_value_to_percentage,
|
||||
)
|
||||
|
||||
from . import group as group_pre_import # noqa: F401
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from functools import cached_property
|
||||
else:
|
||||
|
@ -1,13 +0,0 @@
|
||||
"""Describe group states."""
|
||||
|
||||
from homeassistant.components.group import GroupIntegrationRegistry
|
||||
from homeassistant.const import STATE_OFF, STATE_ON
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
|
||||
|
||||
@callback
|
||||
def async_describe_on_off_states(
|
||||
hass: HomeAssistant, registry: GroupIntegrationRegistry
|
||||
) -> None:
|
||||
"""Describe group on off states."""
|
||||
registry.on_off_states({STATE_ON}, STATE_OFF)
|
@ -34,7 +34,6 @@ from homeassistant.helpers.entity_component import EntityComponent
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
from homeassistant.loader import bind_hass
|
||||
|
||||
from . import group as group_pre_import # noqa: F401
|
||||
from .const import ( # noqa: F401
|
||||
_DEPRECATED_DEVICE_CLASS_DEHUMIDIFIER,
|
||||
_DEPRECATED_DEVICE_CLASS_HUMIDIFIER,
|
||||
|
@ -1,13 +0,0 @@
|
||||
"""Describe group states."""
|
||||
|
||||
from homeassistant.components.group import GroupIntegrationRegistry
|
||||
from homeassistant.const import STATE_OFF, STATE_ON
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
|
||||
|
||||
@callback
|
||||
def async_describe_on_off_states(
|
||||
hass: HomeAssistant, registry: GroupIntegrationRegistry
|
||||
) -> None:
|
||||
"""Describe group on off states."""
|
||||
registry.on_off_states({STATE_ON}, STATE_OFF)
|
@ -34,8 +34,6 @@ from homeassistant.helpers.typing import ConfigType
|
||||
from homeassistant.loader import bind_hass
|
||||
import homeassistant.util.color as color_util
|
||||
|
||||
from . import group as group_pre_import # noqa: F401
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from functools import cached_property
|
||||
else:
|
||||
|
@ -1,13 +0,0 @@
|
||||
"""Describe group states."""
|
||||
|
||||
from homeassistant.components.group import GroupIntegrationRegistry
|
||||
from homeassistant.const import STATE_OFF, STATE_ON
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
|
||||
|
||||
@callback
|
||||
def async_describe_on_off_states(
|
||||
hass: HomeAssistant, registry: GroupIntegrationRegistry
|
||||
) -> None:
|
||||
"""Describe group on off states."""
|
||||
registry.on_off_states({STATE_ON}, STATE_OFF)
|
@ -1,13 +1,17 @@
|
||||
"""Describe group states."""
|
||||
|
||||
from homeassistant.components.group import GroupIntegrationRegistry
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from homeassistant.const import STATE_LOCKED, STATE_UNLOCKED
|
||||
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
|
||||
hass: HomeAssistant, registry: "GroupIntegrationRegistry"
|
||||
) -> None:
|
||||
"""Describe group on off states."""
|
||||
registry.on_off_states({STATE_UNLOCKED}, STATE_LOCKED)
|
||||
|
@ -1,6 +1,7 @@
|
||||
"""Describe group states."""
|
||||
|
||||
from homeassistant.components.group import GroupIntegrationRegistry
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from homeassistant.const import (
|
||||
STATE_IDLE,
|
||||
STATE_OFF,
|
||||
@ -10,10 +11,13 @@ from homeassistant.const import (
|
||||
)
|
||||
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
|
||||
hass: HomeAssistant, registry: "GroupIntegrationRegistry"
|
||||
) -> None:
|
||||
"""Describe group on off states."""
|
||||
registry.on_off_states(
|
||||
|
@ -1,13 +1,17 @@
|
||||
"""Describe group states."""
|
||||
|
||||
from homeassistant.components.group import GroupIntegrationRegistry
|
||||
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
|
||||
hass: HomeAssistant, registry: "GroupIntegrationRegistry"
|
||||
) -> None:
|
||||
"""Describe group on off states."""
|
||||
registry.on_off_states({STATE_HOME}, STATE_NOT_HOME)
|
||||
|
@ -1,13 +1,17 @@
|
||||
"""Describe group states."""
|
||||
|
||||
from homeassistant.components.group import GroupIntegrationRegistry
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from homeassistant.const import STATE_OK, STATE_PROBLEM
|
||||
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
|
||||
hass: HomeAssistant, registry: "GroupIntegrationRegistry"
|
||||
) -> None:
|
||||
"""Describe group on off states."""
|
||||
registry.on_off_states({STATE_PROBLEM}, STATE_OK)
|
||||
|
@ -37,8 +37,6 @@ from homeassistant.helpers.entity_component import EntityComponent
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
from homeassistant.loader import bind_hass
|
||||
|
||||
from . import group as group_pre_import # noqa: F401
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from functools import cached_property
|
||||
else:
|
||||
|
@ -1,13 +0,0 @@
|
||||
"""Describe group states."""
|
||||
|
||||
from homeassistant.components.group import GroupIntegrationRegistry
|
||||
from homeassistant.const import STATE_OFF, STATE_ON
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
|
||||
|
||||
@callback
|
||||
def async_describe_on_off_states(
|
||||
hass: HomeAssistant, registry: GroupIntegrationRegistry
|
||||
) -> None:
|
||||
"""Describe group on off states."""
|
||||
registry.on_off_states({STATE_ON}, STATE_OFF)
|
@ -1,12 +1,16 @@
|
||||
"""Describe group states."""
|
||||
|
||||
from homeassistant.components.group import GroupIntegrationRegistry
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
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
|
||||
hass: HomeAssistant, registry: "GroupIntegrationRegistry"
|
||||
) -> None:
|
||||
"""Describe group on off states."""
|
||||
registry.exclude_domain()
|
||||
|
@ -33,7 +33,6 @@ from homeassistant.helpers.entity_component import EntityComponent
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
from homeassistant.loader import bind_hass
|
||||
|
||||
from . import group as group_pre_import # noqa: F401
|
||||
from .const import DOMAIN
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
@ -1,13 +0,0 @@
|
||||
"""Describe group states."""
|
||||
|
||||
from homeassistant.components.group import GroupIntegrationRegistry
|
||||
from homeassistant.const import STATE_OFF, STATE_ON
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
|
||||
|
||||
@callback
|
||||
def async_describe_on_off_states(
|
||||
hass: HomeAssistant, registry: GroupIntegrationRegistry
|
||||
) -> None:
|
||||
"""Describe group on off states."""
|
||||
registry.on_off_states({STATE_ON}, STATE_OFF)
|
@ -1,15 +1,18 @@
|
||||
"""Describe group states."""
|
||||
|
||||
from homeassistant.components.group import GroupIntegrationRegistry
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from homeassistant.const import STATE_OFF, STATE_ON
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from homeassistant.components.group import GroupIntegrationRegistry
|
||||
from .const import STATE_CLEANING, STATE_ERROR, STATE_RETURNING
|
||||
|
||||
|
||||
@callback
|
||||
def async_describe_on_off_states(
|
||||
hass: HomeAssistant, registry: GroupIntegrationRegistry
|
||||
hass: HomeAssistant, registry: "GroupIntegrationRegistry"
|
||||
) -> None:
|
||||
"""Describe group on off states."""
|
||||
registry.on_off_states(
|
||||
|
@ -1,9 +1,12 @@
|
||||
"""Describe group states."""
|
||||
|
||||
from homeassistant.components.group import GroupIntegrationRegistry
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from homeassistant.const import STATE_OFF
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from homeassistant.components.group import GroupIntegrationRegistry
|
||||
from .const import (
|
||||
STATE_ECO,
|
||||
STATE_ELECTRIC,
|
||||
@ -16,7 +19,7 @@ from .const import (
|
||||
|
||||
@callback
|
||||
def async_describe_on_off_states(
|
||||
hass: HomeAssistant, registry: GroupIntegrationRegistry
|
||||
hass: HomeAssistant, registry: "GroupIntegrationRegistry"
|
||||
) -> None:
|
||||
"""Describe group on off states."""
|
||||
registry.on_off_states(
|
||||
|
@ -1,12 +1,16 @@
|
||||
"""Describe group states."""
|
||||
|
||||
from homeassistant.components.group import GroupIntegrationRegistry
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
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
|
||||
hass: HomeAssistant, registry: "GroupIntegrationRegistry"
|
||||
) -> None:
|
||||
"""Describe group on off states."""
|
||||
registry.exclude_domain()
|
||||
|
Loading…
x
Reference in New Issue
Block a user