Hello, I have a problem with a template. I mean in earlier HA versions there was no error message. The actually version is core-2022.6.6.
Unfortunately, I can’t get along with the template programming. Maybe someone can help me with this?
Log:
TemplateError('ValueError: Template error: as_timestamp got invalid input '' when rendering template '{{ as_timestamp(states.binary_sensor.bwm_flur.last_changed)|timestamp_custom('%d.%m.%Y %H:%M') }}' but no default was specified') while processing template 'Template("{{ as_timestamp(states.binary_sensor.bwm_flur.last_changed)|timestamp_custom('%d.%m.%Y %H:%M') }}")' for attribute '_attr_native_value' in entity 'sensor.bwm_flur_last_motion'
Template:
- sensor:
- name: "bwm_flur_last_motion"
state: "{{ as_timestamp(states.binary_sensor.bwm_flur.last_changed)|timestamp_custom('%d.%m.%Y %H:%M') }}"
icon: mdi:clock-time-four-outline
2 posts - 2 participants