lock _states to prevent size change during iteration
This commit is contained in:
1 parent
680f450278
commit
9e816cfd3f
1 file changed
+3
-2
@@ -404,8 +404,9 @@ class StateMachine(object):
|
||||
|
||||
domain_filter = domain_filter.lower()
|
||||
|
||||
return [state.entity_id for state in self._states.values()
|
||||
if state.domain == domain_filter]
|
||||
with self._lock:
|
||||
return [state.entity_id for state in self._states.values()
|
||||
if state.domain == domain_filter]
|
||||
|
||||
def all(self):
|
||||
"""Create a list of all states."""
|
||||
|
||||
Reference in new issue
Block a user