lock _states to prevent size change during iteration

pull/1240/head
Per Sandström 2016-02-14 06:34:00 +01:00
parent 680f450278
commit 9e816cfd3f
1 changed files with 3 additions and 2 deletions

View File

@ -404,6 +404,7 @@ class StateMachine(object):
domain_filter = domain_filter.lower()
with self._lock:
return [state.entity_id for state in self._states.values()
if state.domain == domain_filter]