Merge pull request #1240 from persandstrom/dict_size_change_during_iteration
Fixed intermittent error during setup
This commit is contained in:
commit
39bbfd14d9
1 changed files with 3 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue