def __iter__(self):
    'Return the iteration over all the states.'
    self._collect_domain()
    return _state_generator(self._hass, self._domain)
Return the iteration over all the states.
def __iter__(self):
    
    self._collect_domain()
    return _state_generator(self._hass, self._domain)