hvorragend / ha-blueprints

Other
32 stars 9 forks source link

Error initializing 'template' trigger after update to 2024.09.05 #141

Open non092 opened 6 days ago

non092 commented 6 days ago

Hi, After upgrading to 2024.09.05 last week the error below is logged for all automations using the bluebprint. I can share my configuration if needed but the variables mentioned in the error are not part of my configuration. It seems that error also prevent any trigger from working properly.

I was running HA 2024.8.3 and upgraded today to 2024.9.1 and I’m still seeing the same issue.

Logger: homeassistant.helpers.event
Source: helpers/template.py:605 
First occurred: 08:03:49 (2 occurrences) 
Last logged: 08:03:49

Error while processing template: Template<template=({{ states(shading_brightness_sensor) | float(default=shading_sun_brightness_start) > shading_sun_brightness_start }}) renders=6>
Error while processing template: Template<template=({{ states(shading_temperatur_sensor1) | float(default=shading_min_temperatur1) > shading_min_temperatur1 }}) renders=6>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 603, in async_render
    render_result = _render_with_context(self.template, compiled, **kwargs)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2638, in _render_with_context
    return template.render(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/jinja2/environment.py", line 1304, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.12/site-packages/jinja2/environment.py", line 939, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<template>", line 1, in top-level template code
  File "/usr/local/lib/python3.12/site-packages/jinja2/sandbox.py", line 394, in call
    return __context.call(__obj, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 902, in __call__
    state = _get_state(self._hass, entity_id)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1191, in _get_state
    return _get_template_state_from_state(hass, entity_id, hass.states.get(entity_id))
                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2126, in get
    return self._states_data.get(entity_id) or self._states_data.get(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: unhashable type: 'list'

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 715, in async_render_to_info
    render_info._result = self.async_render(  # noqa: SLF001
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 605, in async_render
    raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: TypeError: unhashable type: 'list'
hvorragend commented 6 days ago

Please look here: https://community.home-assistant.io/t/cover-control-automation-cca-a-comprehensive-and-highly-configurable-roller-blind-blueprint/680539/1242?u=herr.vorragend

Thank you. I have found the bug. Will fix it soon.

non092 commented 4 days ago

Thanks for your confirmation that this doesn’t affect functionality. Good to know it will be fixed 😊