C’est bon j’avais oublié de mettre /local/ dans le lien ressource…mais j’ai encore ces deux messages :
2023-02-05 18:22:33.838 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template("{{ state_attr('sensor.pronote_edt_lou_aujourdhui', 'edt_aujourdhui')[0]['annulation'] }}")
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/homeassistant/helpers/template.py", line 457, in async_render
render_result = _render_with_context(self.template, compiled, **kwargs)
File "/usr/lib/python3.10/site-packages/homeassistant/helpers/template.py", line 1984, in _render_with_context
return template.render(**kwargs)
File "/usr/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render
self.environment.handle_exception()
File "/usr/lib/python3.10/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
File "/usr/lib/python3.10/site-packages/jinja2/sandbox.py", line 303, in getitem
return obj[argument]
jinja2.exceptions.UndefinedError: list object has no element 0
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/homeassistant/helpers/template.py", line 575, in async_render_to_info
render_info._result = self.async_render(variables, strict=strict, **kwargs)
File "/usr/lib/python3.10/site-packages/homeassistant/helpers/template.py", line 459, in async_render
raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: UndefinedError: list object has no element 0
2023-02-05 18:22:33.843 ERROR (MainThread) [homeassistant.helpers.template_entity] TemplateError('UndefinedError: list object has no element 0') while processing template 'Template("{{ state_attr('sensor.pronote_edt_lou_aujourdhui', 'edt_aujourdhui')[0]['annulation'] }}")' for attribute '_state' in entity 'binary_sensor.pronote_edt_lou_aujourdhui_cours_0_annulation'
2023-02-05 18:22:33.876 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template("{{ state_attr('sensor.pronote_edt_demo_prochain_jour', 'edt_prochainjour')[0]['annulation'] }}")
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/homeassistant/helpers/template.py", line 457, in async_render
render_result = _render_with_context(self.template, compiled, **kwargs)
File "/usr/lib/python3.10/site-packages/homeassistant/helpers/template.py", line 1984, in _render_with_context
return template.render(**kwargs)
File "/usr/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render
self.environment.handle_exception()
File "/usr/lib/python3.10/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
File "/usr/lib/python3.10/site-packages/jinja2/sandbox.py", line 303, in getitem
return obj[argument]
jinja2.exceptions.UndefinedError: None has no element 0
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/homeassistant/helpers/template.py", line 575, in async_render_to_info
render_info._result = self.async_render(variables, strict=strict, **kwargs)
File "/usr/lib/python3.10/site-packages/homeassistant/helpers/template.py", line 459, in async_render
raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: UndefinedError: None has no element 0
2023-02-05 18:22:33.877 ERROR (MainThread) [homeassistant.helpers.template_entity] TemplateError('UndefinedError: None has no element 0') while processing template 'Template("{{ state_attr('sensor.pronote_edt_demo_prochain_jour', 'edt_prochainjour')[0]['annulation'] }}")' for attribute '_state' in entity 'binary_sensor.pronote_edt_demo_prochain_jour_cours_0_annulation'
Ces messages sont identiques pour les sensors 0 à 6 à chaque fois .
Est ce un comportement normal si pas cours auj (dimanche) et cours annulés demain ? Sinon une idée de ce qui peut provoquer ces erreurs ?
Merci