def __getattr__(self, name):
    'Return the states.'
    return _get_state_if_valid(self._hass, f'{self._domain}.{name}')
Return the states.
def __getattr__(self, name):
    
    return _get_state_if_valid(self._hass, f'{self._domain}.{name}')