Hi All,
I’m having some issues with some errors showing in my new dashboard. I keep getting errors relating to template sensors and I can’t seem to find what is causing the issue. Looking at the logs it’s mentioning that it can’t filter on ro, presumably from when I had a round value but I have since removed this and I’m still getting errors.
I have pasted the logs below and all the snippet of code I think is causing the error.
Any help would be appreciated, thank you.
cards:
- type: custom:mushroom-template-card
primary: Hallway
secondary: >-
{{ states('sensor.sonoff_hallway_temperature') | round (1) }}°C - {{
states('sensor.sonoff_hallway_humidity')}}%
icon: none
entity: light.hallway_lamp
tap_action:
action: navigate
Logger: homeassistant.helpers.event
Source: helpers/template.py:514
First occurred: 16:14:00 (2 occurrences)
Last logged: 16:14:03
Error while processing template: Template<template=({{ states('sensor.sonoff_hallway_temperature') | round (1) }}°C - {{ states('sensor.sonoff_hallway_humidity') | ro }}%) renders=2>
Error while processing template: Template<template=({{ states('sensor.sonoff_hallway_temperature') | round (1) }}°C - {{ states('sensor.sonoff_hallway_humidity') | ro }}%) renders=6>
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 2647, 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 1, in template
jinja2.exceptions.TemplateAssertionError: No filter named 'ro'.
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: TemplateAssertionError: No filter named 'ro'.