TemplateError(‘ValueError: Template error: as_timestamp got invalid input ‘’ when rendering template ‘{{states.binary_sensor.kitchen_window_opening.last_updated | as_timestamp|timestamp_custom(’%d/%m/%Y %H:%M:%S’)}}’ but no default was specified’) while processing template ‘Template<template=({{states.binary_sensor.kitchen_window_opening.last_updated | as_timestamp|timestamp_custom(’%d/%m/%Y %H:%M:%S’)}}) renders=4>’ for attribute ‘_attr_native_value’ in entity ‘sensor.kitchen_window_sensor_last_updated’
Avoid using states.sensor.temperature.state, instead use states('sensor.temperature').
It is strongly advised to use the states(), is_state(), state_attr() and is_state_attr() as much as possible,
to avoid errors and error message when the entity isn’t ready yet (e.g., during Home Assistant startup)