ical-sensor-homeassistant icon indicating copy to clipboard operation
ical-sensor-homeassistant copied to clipboard

Errors showing up in the past few days - new entities not being added...

Open lux4rd0 opened this issue 7 months ago • 0 comments

Getting errors on future appointments. Errors in the log:

Logger: homeassistant.components.template.template_entity Source: components/template/template_entity.py:194 Integration: Template (documentation, issues) First occurred: 2:40:15 PM (30 occurrences) Last logged: 2:40:15 PM

TemplateError('ValueError: Template error: as_timestamp got invalid input 'None' when rendering template '{{ as_timestamp(state_attr('sensor.ical_schedule_event_8', 'start')) | timestamp_custom('%-d') }}' but no default was specified') while processing template 'Template<template=({{ as_timestamp(state_attr('sensor.ical_schedule_event_8', 'start')) | timestamp_custom('%-d') }}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.ical_schedule_event_day_8'
TemplateError('ValueError: Template error: as_timestamp got invalid input 'None' when rendering template '{{ as_timestamp(state_attr('sensor.ical_schedule_event_8', 'start')) | timestamp_custom('%A') }}' but no default was specified') while processing template 'Template<template=({{ as_timestamp(state_attr('sensor.ical_schedule_event_8', 'start')) | timestamp_custom('%A') }}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.ical_schedule_event_weekday_8'
TemplateError('ValueError: Template error: as_timestamp got invalid input 'None' when rendering template '{{ as_timestamp(state_attr('sensor.ical_schedule_event_9', 'start')) | timestamp_custom('%-m') }}' but no default was specified') while processing template 'Template<template=({{ as_timestamp(state_attr('sensor.ical_schedule_event_9', 'start')) | timestamp_custom('%-m') }}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.ical_schedule_event_month_9'
TemplateError('ValueError: Template error: as_timestamp got invalid input 'None' when rendering template '{{ as_timestamp(state_attr('sensor.ical_schedule_event_9', 'start')) | timestamp_custom('%-d') }}' but no default was specified') while processing template 'Template<template=({{ as_timestamp(state_attr('sensor.ical_schedule_event_9', 'start')) | timestamp_custom('%-d') }}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.ical_schedule_event_day_9'
TemplateError('ValueError: Template error: as_timestamp got invalid input 'None' when rendering template '{{ as_timestamp(state_attr('sensor.ical_schedule_event_9', 'start')) | timestamp_custom('%A') }}' but no default was specified') while processing template 'Template<template=({{ as_timestamp(state_attr('sensor.ical_schedule_event_9', 'start')) | timestamp_custom('%A') }}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.ical_schedule_event_weekday_9'

As well as:

Logger: homeassistant.helpers.event
Source: helpers/template.py:570
First occurred: 2:40:15 PM (30 occurrences)
Last logged: 2:40:15 PM

Error while processing template: Template<template=({{ as_timestamp(state_attr('sensor.ical_schedule_event_8', 'start')) | timestamp_custom('%-d') }}) renders=2>
Error while processing template: Template<template=({{ as_timestamp(state_attr('sensor.ical_schedule_event_8', 'start')) | timestamp_custom('%A') }}) renders=2>
Error while processing template: Template<template=({{ as_timestamp(state_attr('sensor.ical_schedule_event_9', 'start')) | timestamp_custom('%-m') }}) renders=2>
Error while processing template: Template<template=({{ as_timestamp(state_attr('sensor.ical_schedule_event_9', 'start')) | timestamp_custom('%-d') }}) renders=2>
Error while processing template: Template<template=({{ as_timestamp(state_attr('sensor.ical_schedule_event_9', 'start')) | timestamp_custom('%A') }}) renders=2>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1821, in forgiving_as_timestamp
    return dt_util.as_timestamp(value)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/dt.py", line 135, in as_timestamp
    raise ValueError("not a valid date/time.")
ValueError: not a valid date/time.

During handling of the above exception, another exception occurred:

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 2231, 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
  File "/usr/local/lib/python3.11/site-packages/jinja2/sandbox.py", line 393, in call
    return __context.call(__obj, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1824, in forgiving_as_timestamp
    raise_no_default("as_timestamp", value)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1626, in raise_no_default
    raise ValueError(
ValueError: Template error: as_timestamp got invalid input 'None' when rendering template '{{ as_timestamp(state_attr('sensor.ical_schedule_event_0', 'start')) | timestamp_custom('%-m') }}' but no default was specified

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: ValueError: Template error: as_timestamp got invalid input 'None' when rendering template '{{ as_timestamp(state_attr('sensor.ical_schedule_event_0', 'start')) | timestamp_custom('%-m') }}' but no default was specified

running 1.67 of the plugin:

Core 2023.11.2 Frontend 20231030.2

lux4rd0 avatar Nov 21 '23 20:11 lux4rd0