mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Wrap state when iterating a domain in templates (#9157)
This commit is contained in:
parent
21bf089b17
commit
8605098ea0
@ -209,7 +209,7 @@ class DomainStates(object):
|
|||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
"""Return the iteration over all the states."""
|
"""Return the iteration over all the states."""
|
||||||
return iter(sorted(
|
return iter(sorted(
|
||||||
(state for state in self._hass.states.async_all()
|
(_wrap_state(state) for state in self._hass.states.async_all()
|
||||||
if state.domain == self._domain),
|
if state.domain == self._domain),
|
||||||
key=lambda state: state.entity_id))
|
key=lambda state: state.entity_id))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user