Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error #44

Open
stefanojan opened this issue Oct 1, 2023 · 0 comments
Open

error #44

stefanojan opened this issue Oct 1, 2023 · 0 comments

Comments

@stefanojan
Copy link

Logger: homeassistant.helpers.event
Source: helpers/template.py:570
First occurred: 19:02:34 (3 occurrences)
Last logged: 19:02:34

Error while processing template: Template<template=({% set global = 'binary_sensor.global_natural_alert' %} {% set meteoalarm = 'binary_sensor.meteoalarm' %} {% set alert_type = {'White':'info', 'Green':'success', 'Gold':'warning', 'Orange':'warning', 'Red':'error'} %} {% set days = ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"] %} {% set start = as_timestamp(state_attr(meteoalarm, 'effective'),0) %} {% set end = as_timestamp(state_attr(meteoalarm, 'expires'),0) %} <details {{'open' if is_state(meteoalarm, 'on') else ''}}>

{{state_attr(meteoalarm, 'friendly_name')}}
{{ state_attr(meteoalarm, 'urgency')|upper }} {{state_attr(meteoalarm, 'event')}}
Da {{days[start|timestamp_custom('%w')|int(0)]}}{{start|timestamp_custom(' %d alle %H:%M')}} a {{days[end|timestamp_custom('%w')|int(0)]}}{{end|timestamp_custom(' %d alle %H:%M')}}

{{(state_attr(meteoalarm, 'description')|default('',true)).split('(DISCLAIMER')[0]}}

{{state_attr(meteoalarm, 'instruction')}}
) renders=2>
Error while processing template: Template<template=({% set global = 'binary_sensor.global_natural_alert' %} {% set meteoalarm = 'binary_sensor.meteoalarm' %} {% set alert_type = {'White':'info', 'Green':'success', 'Gold':'warning', 'Orange':'warning', 'Red':'error'} %} {% set days = ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"] %} {% set start = as_timestamp(state_attr(meteoalarm, 'effective'),0) %} {% set end = as_timestamp(state_attr(meteoalarm, 'expires'),0) %} <details {{'open' if is_state(meteoalarm, 'on') else ''}}> {{state_attr(meteoalarm, 'friendly_name')}}
{{ state_attr(meteoalarm, 'urgency')|upper }} {{state_attr(meteoalarm, 'event')}}
Da {{days[start|timestamp_custom('%w')|int(0)]}}{{start|timestamp_custom(' %d alle %H:%M')}} a {{days[end|timestamp_custom('%w')|int(0)]}}{{end|timestamp_custom(' %d alle %H:%M')}}

{{(state_attr(meteoalarm, 'description')|default('',true)).split('(DISCLAIMER')[0]}}

{{state_attr(meteoalarm, 'instruction')}}
) renders=4>
Error while processing template: Template<template=({% set global = 'binary_sensor.global_natural_alert' %} {% set meteoalarm = 'binary_sensor.meteoalarm' %} {% set alert_type = {'White':'info', 'Green':'success', 'Gold':'warning', 'Orange':'warning', 'Red':'error'} %} {% set days = ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"] %} {% set start = as_timestamp(state_attr(meteoalarm, 'effective'),0) %} {% set end = as_timestamp(state_attr(meteoalarm, 'expires'),0) %} <details {{'open' if is_state(meteoalarm, 'on') else ''}}> {{state_attr(meteoalarm, 'friendly_name')}}
{{ state_attr(meteoalarm, 'urgency')|upper }} {{state_attr(meteoalarm, 'event')}}
Da {{days[start|timestamp_custom('%w')|int(0)]}}{{start|timestamp_custom(' %d alle %H:%M')}} a {{days[end|timestamp_custom('%w')|int(0)]}}{{end|timestamp_custom(' %d alle %H:%M')}}

{{(state_attr(meteoalarm, 'description')|default('',true)).split('(DISCLAIMER')[0]}}

{{state_attr(meteoalarm, 'instruction')}}
) renders=6>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 568, in async_render
render_result = _render_with_context(self.template, compiled, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2198, in _render_with_context
return template.render(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 1301, in render
self.environment.handle_exception()
File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File "", line 6, in top-level template code
jinja2.exceptions.UndefinedError: dict object has no element None

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 694, in async_render_to_info
render_info._result = self.async_render(
^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 570, in async_render
raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: UndefinedError: dict object has no element None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant