2023-10-13 10:16:56.277 WARNING (MainThread) [homeassistant.components.template.trigger] Error initializing 'template' trigger for 'CN FSM Elettrodomestici 2023.9.0 Asciugatrice': ZeroDivisionError: integer modulo by zero
2023-10-13 10:16:56.280 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template<template=({{ states(counter_sensor)|int(default=0) % states(helper_maintenance_alert)|int(default=0) == 0 }}) renders=3>
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 2196, 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 1, in top-level template code
ZeroDivisionError: integer modulo by zero
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: ZeroDivisionError: integer modulo by zero