def __len__(self) -> int:
    'Return number of states.'
    self._collect_all_lifecycle()
    return self._hass.states.async_entity_ids_count()
Return number of states.
def __len__(self) -> int:
    
    self._collect_all_lifecycle()
    return self._hass.states.async_entity_ids_count()