From 7fe84eb34ed87635fabe92fb29eef9c5987b7546 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 6 Jun 2023 08:51:08 -0500 Subject: [PATCH] avoid teaching templates about persistent_notification --- homeassistant/helpers/template.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/helpers/template.py b/homeassistant/helpers/template.py index 7b68c193ab..c1244c8856 100644 --- a/homeassistant/helpers/template.py +++ b/homeassistant/helpers/template.py @@ -463,7 +463,7 @@ def async_register_hass_environment_function( """Register the environment function.""" for env in _ENVIRONMENTS: template_env = cast(TemplateEnvironment, hass.data[env]) - template_env.async_register_function(name, func) + template_env.async_register_hass_function(name, func) class Template: @@ -2530,8 +2530,8 @@ class TemplateEnvironment(ImmutableSandboxedEnvironment): return pass_context(wrapper) - def async_register_function(self, name: str, func: Callable[..., Any]) -> None: - """Register a function.""" + def async_register_hass_function(self, name: str, func: Callable[..., Any]) -> None: + """Register a function that needs to be wrapped with hass.""" hass_func = self.hassfunction(func) self.globals[name] = hass_func self.filters[name] = hass_func