Rejestrator: homeassistant.helpers.event
Źródło: helpers/template.py:646
Pierwsze zdarzenie: 10:55:32 (1 wystąpienie)
Ostatnio zalogowany: 10:55:32

Error while processing template: Template<template=({% if state_attr('input_datetime.date_picker', "timestamp")==as_timestamp(states('sensor.date')) %} -0d {% else %} {{ ((as_timestamp(states('sensor.date'))|float(0) - state_attr('input_datetime.date_picker', "timestamp")|float(0)))/ -86400 }}d {% endif %}) renders=2>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2206, in forgiving_as_timestamp
    return dt_util.as_timestamp(value)
           ~~~~~~~~~~~~~~~~~~~~^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/dt.py", line 155, 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 644, in async_render
    render_result = _render_with_context(self.template, compiled, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2969, in _render_with_context
    return template.render(**kwargs)
           ~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/jinja2/environment.py", line 1295, in render
    self.environment.handle_exception()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/site-packages/jinja2/environment.py", line 942, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<template>", line 1, in top-level template code
  File "/usr/local/lib/python3.13/site-packages/jinja2/sandbox.py", line 401, in call
    return __context.call(__obj, *args, **kwargs)
           ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2209, in forgiving_as_timestamp
    raise_no_default("as_timestamp", value)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1972, in raise_no_default
    raise ValueError(
    ...<2 lines>...
    )
ValueError: Template error: as_timestamp got invalid input 'unknown' when rendering template '{% if state_attr('input_datetime.date_picker', "timestamp")==as_timestamp(states('sensor.date')) %}
  -0d
{% else %}
  {{ ((as_timestamp(states('sensor.date'))|float(0) - state_attr('input_datetime.date_picker', "timestamp")|float(0)))/ -86400 }}d
{% endif %}' 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 761, in async_render_to_info
    render_info._result = self.async_render(  # noqa: SLF001
                          ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
        variables, strict=strict, log_fn=log_fn, **kwargs
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 646, in async_render
    raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: ValueError: Template error: as_timestamp got invalid input 'unknown' when rendering template '{% if state_attr('input_datetime.date_picker', "timestamp")==as_timestamp(states('sensor.date')) %}
  -0d
{% else %}
  {{ ((as_timestamp(states('sensor.date'))|float(0) - state_attr('input_datetime.date_picker', "timestamp")|float(0)))/ -86400 }}d
{% endif %}' but no default was specified