mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 19:09:32 +00:00
@@ -90,7 +90,12 @@ class EntityComponent(Generic[_EntityT]):
|
||||
|
||||
@property
|
||||
def entities(self) -> Iterable[_EntityT]:
|
||||
"""Return an iterable that returns all entities."""
|
||||
"""
|
||||
Return an iterable that returns all entities.
|
||||
|
||||
As the underlying dicts may change when async context is lost, callers that
|
||||
iterate over this asynchronously should make a copy using list() before iterating.
|
||||
"""
|
||||
return chain.from_iterable(
|
||||
platform.entities.values() # type: ignore[misc]
|
||||
for platform in self._platforms.values()
|
||||
|
||||
Reference in New Issue
Block a user