@property
def _env(self) -> TemplateEnvironment:
    if (self.hass is None):
        return _NO_HASS_ENV
    if self._limited:
        wanted_env = _ENVIRONMENT_LIMITED
    elif self._strict:
        wanted_env = _ENVIRONMENT_STRICT
    else:
        wanted_env = _ENVIRONMENT
    ret: (TemplateEnvironment | None) = self.hass.data.get(wanted_env)
    if (ret is None):
        ret = self.hass.data[wanted_env] = TemplateEnvironment(self.hass, self._limited, self._strict)
    return ret
@property
def _env(self) -> TemplateEnvironment:
    if (self.hass is None):
        return _NO_HASS_ENV
    if self._limited:
        wanted_env = _ENVIRONMENT_LIMITED
    elif self._strict:
        wanted_env = _ENVIRONMENT_STRICT
    else:
        wanted_env = _ENVIRONMENT
    ret: (TemplateEnvironment | None) = self.hass.data.get(wanted_env)
    if (ret is None):
        ret = self.hass.data[wanted_env] = TemplateEnvironment(self.hass, self._limited, self._strict)
    return ret