mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Move group helpers into their own module (#106924)
This gets rid of the legacy need to use bind_hass, and the expand function no longer looses typing.
This commit is contained in:
@@ -53,6 +53,7 @@ from . import (
|
||||
template,
|
||||
translation,
|
||||
)
|
||||
from .group import expand_entity_ids
|
||||
from .selector import TargetSelector
|
||||
from .typing import ConfigType, TemplateVarsType
|
||||
|
||||
@@ -459,9 +460,9 @@ def async_extract_referenced_entity_ids(
|
||||
if not selector.has_any_selector:
|
||||
return selected
|
||||
|
||||
entity_ids = selector.entity_ids
|
||||
entity_ids: set[str] | list[str] = selector.entity_ids
|
||||
if expand_group:
|
||||
entity_ids = hass.components.group.expand_entity_ids(entity_ids)
|
||||
entity_ids = expand_entity_ids(hass, entity_ids)
|
||||
|
||||
selected.referenced.update(entity_ids)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user