def __getattr__(self, name):
    'Return the domain state.'
    if ('.' in name):
        return _get_state_if_valid(self._hass, name)
    if (name in _RESERVED_NAMES):
        return None
    if (not valid_entity_id(f'{name}.entity')):
        raise TemplateError(f"Invalid domain name '{name}'")
    return DomainStates(self._hass, name)
Return the domain state.
def __getattr__(self, name):
    
    if ('.' in name):
        return _get_state_if_valid(self._hass, name)
    if (name in _RESERVED_NAMES):
        return None
    if (not valid_entity_id(f'{name}.entity')):
        raise TemplateError(f"Invalid domain name '{name}'")
    return DomainStates(self._hass, name)