Viva @j_assuncao,
Mas eu fiz uma automação e não um scritp e obtenho o erro qd exceuto a automação.
Fui confirmar, e não possuo nenhum script que faça refª às entidades do código acima.
Partilho detalhes do erro:
Log Details (ERROR)
Logger: homeassistant.components.automation
Source: helpers/service.py:119
Integration: Automation (documentation, issues)
First occurred: 5:44:42 PM (1 occurrences)
Last logged: 5:44:42 PM
CZ | Exaustor: Error executing script. Unexpected error for call_service at pos 1: Error rendering service name template: UndefinedError: 'trigger' is undefined
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 228, in async_render
return compiled.render(kwargs).strip()
File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 1090, in render
self.environment.handle_exception()
File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 832, in handle_exception
reraise(*rewrite_traceback_stack(source=source))
File "/usr/local/lib/python3.7/site-packages/jinja2/_compat.py", line 28, in reraise
raise value.with_traceback(tb)
File "<template>", line 1, in top-level template code
File "/usr/local/lib/python3.7/site-packages/jinja2/sandbox.py", line 407, in getattr
value = getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'trigger' is undefined
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 114, in async_prepare_call_from_config
domain_service = config[CONF_SERVICE_TEMPLATE].async_render(variables)
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 230, in async_render
raise TemplateError(err)
homeassistant.exceptions.TemplateError: UndefinedError: 'trigger' is undefined
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 153, in _async_step
self, f"_async_{cv.determine_script_action(self._action)}_step"
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 623, in _async_call_service_step
*self._prep_call_service_step(), blocking=True, context=self._context
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 252, in _prep_call_service_step
return async_prepare_call_from_config(self._hass, self._action, self._variables)
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 119, in async_prepare_call_from_config
) from ex
homeassistant.exceptions.HomeAssistantError: Error rendering service name template: UndefinedError: 'trigger' is undefined