diff --git a/homeassistant/components/group/binary_sensor.py b/homeassistant/components/group/binary_sensor.py index 9659974886d..a8bb6c79cf2 100644 --- a/homeassistant/components/group/binary_sensor.py +++ b/homeassistant/components/group/binary_sensor.py @@ -121,7 +121,7 @@ class BinarySensorGroup(GroupEntity, BinarySensorEntity): """Initialize a BinarySensorGroup entity.""" super().__init__() self._target_config = target_config - self._domain = BINARY_SENSOR_DOMAIN + self._domains = [BINARY_SENSOR_DOMAIN] self._attr_name = name self._attr_unique_id = unique_id self._device_class = device_class diff --git a/homeassistant/components/group/button.py b/homeassistant/components/group/button.py index df4c4a8e528..348037a29bb 100644 --- a/homeassistant/components/group/button.py +++ b/homeassistant/components/group/button.py @@ -111,7 +111,7 @@ class ButtonGroup(GroupEntity, ButtonEntity): """Initialize a button group.""" super().__init__() self._target_config = target_config - self._domain = BUTTON_DOMAIN + self._domains = [BUTTON_DOMAIN] self._attr_name = name self._attr_unique_id = unique_id diff --git a/homeassistant/components/group/cover.py b/homeassistant/components/group/cover.py index bc73f068a05..21fc58bc1b9 100644 --- a/homeassistant/components/group/cover.py +++ b/homeassistant/components/group/cover.py @@ -119,7 +119,7 @@ class CoverGroup(GroupEntity, CoverEntity): """Initialize a CoverGroup entity.""" super().__init__() self._target_config = target_config - self._domain = COVER_DOMAIN + self._domains = [COVER_DOMAIN] self._covers: dict[str, set[str]] = { KEY_OPEN_CLOSE: set(), KEY_STOP: set(), diff --git a/homeassistant/components/group/entity.py b/homeassistant/components/group/entity.py index 09400a04aa9..d63cd23baf0 100644 --- a/homeassistant/components/group/entity.py +++ b/homeassistant/components/group/entity.py @@ -50,7 +50,7 @@ class GroupEntity(Entity): _attr_should_poll = False _entity_ids: list[str] _target_config: dict[str, Any] - _domain: str + _domains: list[str] @callback def async_start_preview( @@ -89,7 +89,7 @@ class GroupEntity(Entity): return { entity_id for entity_id in entity_ids - if split_entity_id(entity_id)[0] == self._domain + if split_entity_id(entity_id)[0] in self._domains and entity_id != self.entity_id } diff --git a/homeassistant/components/group/event.py b/homeassistant/components/group/event.py index bd63adcfbc3..be05479b0c9 100644 --- a/homeassistant/components/group/event.py +++ b/homeassistant/components/group/event.py @@ -119,7 +119,7 @@ class EventGroup(GroupEntity, EventEntity): """Initialize an event group.""" super().__init__() self._target_config = target_config - self._domain = EVENT_DOMAIN + self._domains = [EVENT_DOMAIN] self._attr_name = name self._attr_unique_id = unique_id self._attr_event_types = [] diff --git a/homeassistant/components/group/fan.py b/homeassistant/components/group/fan.py index c83ec8952c8..ea723dc2abb 100644 --- a/homeassistant/components/group/fan.py +++ b/homeassistant/components/group/fan.py @@ -121,7 +121,7 @@ class FanGroup(GroupEntity, FanEntity): """Initialize a FanGroup entity.""" super().__init__() self._target_config = target_config - self._domain = FAN_DOMAIN + self._domains = [FAN_DOMAIN] self._fans: dict[int, set[str]] = {flag: set() for flag in SUPPORTED_FLAGS} self._percentage = None self._oscillating = None diff --git a/homeassistant/components/group/light.py b/homeassistant/components/group/light.py index 69a138c78ed..ea8fdefa1a5 100644 --- a/homeassistant/components/group/light.py +++ b/homeassistant/components/group/light.py @@ -166,7 +166,7 @@ class LightGroup(GroupEntity, LightEntity): """Initialize a light group.""" super().__init__() self._target_config = target_config - self._domain = LIGHT_DOMAIN + self._domains = [LIGHT_DOMAIN] self._attr_name = name self._attr_unique_id = unique_id self.mode = any diff --git a/homeassistant/components/group/lock.py b/homeassistant/components/group/lock.py index 96e43bbc000..f4c7c6a6af9 100644 --- a/homeassistant/components/group/lock.py +++ b/homeassistant/components/group/lock.py @@ -114,7 +114,7 @@ class LockGroup(GroupEntity, LockEntity): """Initialize a lock group.""" super().__init__() self._target_config = target_config - self._domain = LOCK_DOMAIN + self._domains = [LOCK_DOMAIN] self.group = GenericGroup(self, target_config.get("entity_id", [])) self._attr_supported_features = LockEntityFeature.OPEN self._attr_name = name diff --git a/homeassistant/components/group/media_player.py b/homeassistant/components/group/media_player.py index 87bca8f2b71..5ff07d5ca35 100644 --- a/homeassistant/components/group/media_player.py +++ b/homeassistant/components/group/media_player.py @@ -127,7 +127,7 @@ class MediaPlayerGroup(GroupEntity, MediaPlayerEntity): """Initialize a Media Group entity.""" super().__init__() self._target_config = target_config - self._domain = MEDIA_PLAYER_DOMAIN + self._domains = [MEDIA_PLAYER_DOMAIN] self._name = name self._attr_unique_id = unique_id self._features: dict[str, set[str]] = { diff --git a/homeassistant/components/group/notify.py b/homeassistant/components/group/notify.py index 6f93c1887fd..47196c61276 100644 --- a/homeassistant/components/group/notify.py +++ b/homeassistant/components/group/notify.py @@ -166,7 +166,7 @@ class NotifyGroup(GroupEntity, NotifyEntity): """Initialize a NotifyGroup.""" super().__init__() self._target_config = target_config - self._domain = NOTIFY_DOMAIN + self._domains = [NOTIFY_DOMAIN] self._attr_name = name self._attr_unique_id = unique_id diff --git a/homeassistant/components/group/sensor.py b/homeassistant/components/group/sensor.py index 90461fdf222..c65b43eab52 100644 --- a/homeassistant/components/group/sensor.py +++ b/homeassistant/components/group/sensor.py @@ -357,7 +357,7 @@ class SensorGroup(GroupEntity, SensorEntity): """Initialize a sensor group.""" super().__init__() self._target_config = target_config - self._domain = SENSOR_DOMAIN + self._domains = [SENSOR_DOMAIN, NUMBER_DOMAIN, INPUT_NUMBER_DOMAIN] self.hass = hass self._sensor_type = sensor_type self._configured_state_class = state_class diff --git a/homeassistant/components/group/switch.py b/homeassistant/components/group/switch.py index f509531a6b6..6960391ff86 100644 --- a/homeassistant/components/group/switch.py +++ b/homeassistant/components/group/switch.py @@ -123,7 +123,7 @@ class SwitchGroup(GroupEntity, SwitchEntity): """Initialize a switch group.""" super().__init__() self._target_config = target_config - self._domain = SWITCH_DOMAIN + self._domains = [SWITCH_DOMAIN] self._attr_name = name self._attr_unique_id = unique_id self.mode = any diff --git a/homeassistant/components/group/valve.py b/homeassistant/components/group/valve.py index 9f01024123b..038ad193650 100644 --- a/homeassistant/components/group/valve.py +++ b/homeassistant/components/group/valve.py @@ -114,7 +114,7 @@ class ValveGroup(GroupEntity, ValveEntity): """Initialize a ValveGroup entity.""" super().__init__() self._target_config = target_config - self._domain = VALVE_DOMAIN + self._domains = [VALVE_DOMAIN] self._valves: dict[str, set[str]] = { KEY_OPEN_CLOSE: set(), KEY_STOP: set(),