Durch mein basteln habe ich mir - wie sagt man so schön - jetzt selber ins Knie geschossen.
Obwohl ich die DVD Integration wieder gelöscht habe und HA, incl. dem HA Host neu gebootet habe, habe ich jetzt weiterhin zwei Fehlermeldungen im Log die damit im Zusammenhang stehen. ![Verwirrt :?](./images/smilies/icon_e_confused.gif)
Fehlermeldung 1:
Code: Alles auswählen
Logger: homeassistant.helpers.event
Source: helpers/template.py:570
First occurred: 10:33:34 (2 occurrences)
Last logged: 10:33:34
Error while processing template: Template<template=(content: >- {% set level_colors = ["#c5e566", "#ffeb3b", "#fb8c00", "#e53935", "#880e4f"] %} {% set current_count = state_attr("sensor.warnwetter_current_warning_level", "warning_count") %} {% set advance_count = state_attr("sensor.warnwetter_advance_warning_level", "warning_count") %} {% if ((current_count == 0) and (advance_count == 0)) %} **<font color={{ level_colors[0] }}>Keine Warnungen</font>** {% else %} {% for i in range(current_count) %} {% set headline = state_attr("sensor.warnwetter_current_warning_level", "warning_" ~ loop.index ~ "_headline") %} {% set description = state_attr("sensor.warnwetter_current_warning_level", "warning_" ~ loop.index ~ "_description") %} {% set level = state_attr("sensor.warnwetter_current_warning_level", "warning_" ~ loop.index ~ "_level") %} {% set time_start = state_attr("sensor.warnwetter_current_warning_level", "warning_" ~ loop.index ~ "_start") %} {% set time_end = state_attr("sensor.warnwetter_current_warning_level", "warning_" ~ loop.index ~ "_end") %} **<font color={{ level_colors[level] }}>{{ headline }}</font>** {{ time_start.strftime("%a %H:%M") ~ " - " ~ time_end.strftime("%a %H:%M") }} *{{ description }}* {% if not loop.last %}***{% endif %} {% endfor %} {% if ((current_count != 0) and (advance_count != 0)) %}***{% endif %} {% for i in range(advance_count) %} {% set headline = state_attr("sensor.warnwetter_advance_warning_level", "warning_" ~ loop.index ~ "_headline") %} {% set description = state_attr("sensor.warnwetter_advance_warning_level", "warning_" ~ loop.index ~ "_description") %} {% set level = state_attr("sensor.warnwetter_advance_warning_level", "warning_" ~ loop.index ~ "_level") %} {% set time_start = state_attr("sensor.warnwetter_advance_warning_level", "warning_" ~ loop.index ~ "_start") %} {% set time_end = state_attr("sensor.warnwetter_advance_warning_level", "warning_" ~ loop.index ~ "_end") %} **<font color={{ level_colors[level] }}>{{ headline }}</font>** {{ time_start.strftime("%a %H:%M") ~ " - " ~ time_end.strftime("%a %H:%M") }} *{{ description }}* {% if not loop.last %}***{% endif %} {% endfor %} {% endif %} type: markdown title: DWD Wetterwarnungen The result looks like:) renders=2>
Error while processing template: Template<template=(content: >- {% set level_colors = ["#c5e566", "#ffeb3b", "#fb8c00", "#e53935", "#880e4f"] %} {% set current_count = state_attr("sensor.warnwetter_current_warning_level", "warning_count") %} {% set advance_count = state_attr("sensor.warnwetter_advance_warning_level", "warning_count") %} {% if ((current_count == 0) and (advance_count == 0)) %} **<font color={{ level_colors[0] }}>Keine Warnungen</font>** {% else %} {% for i in range(current_count) %} {% set headline = state_attr("sensor.dwd_weather_warnings_803459010_aktuelle_warnstufe", "warning_" ~ loop.index ~ "_headline") %} {% set description = state_attr("sensor.dwd_weather_warnings_803459010_aktuelle_warnstufe", "warning_" ~ loop.index ~ "_description") %} {% set level = state_attr("sensor.dwd_weather_warnings_803459010_aktuelle_warnstufe", "warning_" ~ loop.index ~ "_level") %} {% set time_start = state_attr("sensor.dwd_weather_warnings_803459010_aktuelle_warnstufe", "warning_" ~ loop.index ~ "_start") %} {% set time_end = state_attr("sensor.dwd_weather_warnings_803459010_aktuelle_warnstufe", "warning_" ~ loop.index ~ "_end") %} **<font color={{ level_colors[level] }}>{{ headline }}</font>** {{ time_start.strftime("%a %H:%M") ~ " - " ~ time_end.strftime("%a %H:%M") }} *{{ description }}* {% if not loop.last %}***{% endif %} {% endfor %} {% if ((current_count != 0) and (advance_count != 0)) %}***{% endif %} {% for i in range(advance_count) %} {% set headline = state_attr("sensor.dwd_weather_warnings_803459010_vorwarnstufe", "warning_" ~ loop.index ~ "_headline") %} {% set description = state_attr("sensor.dwd_weather_warnings_803459010_vorwarnstufe", "warning_" ~ loop.index ~ "_description") %} {% set level = state_attr("sensor.dwd_weather_warnings_803459010_vorwarnstufe", "warning_" ~ loop.index ~ "_level") %} {% set time_start = state_attr("sensor.dwd_weather_warnings_803459010_vorwarnstufe", "warning_" ~ loop.index ~ "_start") %} {% set time_end = state_attr("sensor.dwd_weather_warnings_803459010_vorwarnstufe", "warning_" ~ loop.index ~ "_end") %} **<font color={{ level_colors[level] }}>{{ headline }}</font>** {{ time_start.strftime("%a %H:%M") ~ " - " ~ time_end.strftime("%a %H:%M") }} *{{ description }}* {% if not loop.last %}***{% endif %} {% endfor %} {% endif %} type: markdown title: DWD Wetterwarnungen) renders=2>
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 "<template>", line 8, in top-level template code
File "/usr/local/lib/python3.11/site-packages/jinja2/sandbox.py", line 393, in call
return __context.call(__obj, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/jinja2/sandbox.py", line 101, in safe_range
rng = range(*args)
^^^^^^^^^^^^
TypeError: 'NoneType' object cannot be interpreted as an integer
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: TypeError: 'NoneType' object cannot be interpreted as an integer
Fehlermeldung 2:
Code: Alles auswählen
Logger: homeassistant.helpers.event
Source: helpers/template.py:514
First occurred: 10:33:34 (1 occurrences)
Last logged: 10:33:34
Error while processing template: Template<template=(content: >- {% set level_colors = ["#c5e566", "#ffeb3b", "#fb8c00", "#e53935", "#880e4f"] %} {% set current_count = state_attr("sensor.dwd_weather_warnings_803459010_aktuelle_warnstufe", "warning_count") %} {% set advance_count = state_attr("sensor.dwd_weather_warnings_803459010_vorwarnstufe"", "warning_count") %} {% if ((current_count == 0) and (advance_count == 0)) %} **<font color={{ level_colors[0] }}>Keine Warnungen</font>** {% else %} {% for i in range(current_count) %} {% set headline = state_attr("sensor.dwd_weather_warnings_803459010_aktuelle_warnstufe", "warning_" ~ loop.index ~ "_headline") %} {% set description = state_attr("sensor.dwd_weather_warnings_803459010_aktuelle_warnstufe", "warning_" ~ loop.index ~ "_description") %} {% set level = state_attr("sensor.dwd_weather_warnings_803459010_aktuelle_warnstufe", "warning_" ~ loop.index ~ "_level") %} {% set time_start = state_attr("sensor.dwd_weather_warnings_803459010_aktuelle_warnstufe", "warning_" ~ loop.index ~ "_start") %} {% set time_end = state_attr("sensor.dwd_weather_warnings_803459010_aktuelle_warnstufe", "warning_" ~ loop.index ~ "_end") %} **<font color={{ level_colors[level] }}>{{ headline }}</font>** {{ time_start.strftime("%a %H:%M") ~ " - " ~ time_end.strftime("%a %H:%M") }} *{{ description }}* {% if not loop.last %}***{% endif %} {% endfor %} {% if ((current_count != 0) and (advance_count != 0)) %}***{% endif %} {% for i in range(advance_count) %} {% set headline = state_attr("sensor.dwd_weather_warnings_803459010_vorwarnstufe", "warning_" ~ loop.index ~ "_headline") %} {% set description = state_attr("sensor.dwd_weather_warnings_803459010_vorwarnstufe", "warning_" ~ loop.index ~ "_description") %} {% set level = state_attr("sensor.dwd_weather_warnings_803459010_vorwarnstufe", "warning_" ~ loop.index ~ "_level") %} {% set time_start = state_attr("sensor.dwd_weather_warnings_803459010_vorwarnstufe", "warning_" ~ loop.index ~ "_start") %} {% set time_end = state_attr("sensor.dwd_weather_warnings_803459010_vorwarnstufe", "warning_" ~ loop.index ~ "_end") %} **<font color={{ level_colors[level] }}>{{ headline }}</font>** {{ time_start.strftime("%a %H:%M") ~ " - " ~ time_end.strftime("%a %H:%M") }} *{{ description }}* {% if not loop.last %}***{% endif %} {% endfor %} {% endif %} type: markdown title: DWD Wetterwarnungen) renders=2>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 512, in ensure_valid
self._compiled_code = self._env.compile(self.template)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2607, in compile
cached = self.template_cache[source] = super().compile(source)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 768, in compile
self.handle_exception(source=source_hint)
File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File "<unknown>", line 4, in template
jinja2.exceptions.TemplateSyntaxError: expected token ',', got 'warning_count'
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 562, in async_render
compiled = self._compiled or self._ensure_compiled(limited, strict, log_fn)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 765, in _ensure_compiled
self.ensure_valid()
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 514, in ensure_valid
raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: TemplateSyntaxError: expected token ',', got 'warning_count'
Ich habe noch keine Ahnung was da jetzt los ist. Falls dazu jemand spontan eine Idee hat dann immer her damit.
VG Jim