Wrap state when iterating a domain in templates (#9157)

This commit is contained in:
Paulus Schoutsen 2017-08-26 17:00:59 -07:00 committed by GitHub
parent 21bf089b17
commit 8605098ea0

View File

@ -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))