mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +00:00
lock _states to prevent size change during iteration
This commit is contained in:
parent
680f450278
commit
9e816cfd3f
@ -404,8 +404,9 @@ class StateMachine(object):
|
|||||||
|
|
||||||
domain_filter = domain_filter.lower()
|
domain_filter = domain_filter.lower()
|
||||||
|
|
||||||
return [state.entity_id for state in self._states.values()
|
with self._lock:
|
||||||
if state.domain == domain_filter]
|
return [state.entity_id for state in self._states.values()
|
||||||
|
if state.domain == domain_filter]
|
||||||
|
|
||||||
def all(self):
|
def all(self):
|
||||||
"""Create a list of all states."""
|
"""Create a list of all states."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user