mirror of
https://github.com/home-assistant/core.git
synced 2025-08-11 00:25:12 +02:00
lock _states to prevent size change during iteration
This commit is contained in:
@@ -404,6 +404,7 @@ class StateMachine(object):
|
|||||||
|
|
||||||
domain_filter = domain_filter.lower()
|
domain_filter = domain_filter.lower()
|
||||||
|
|
||||||
|
with self._lock:
|
||||||
return [state.entity_id for state in self._states.values()
|
return [state.entity_id for state in self._states.values()
|
||||||
if state.domain == domain_filter]
|
if state.domain == domain_filter]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user