I’ve had a sensor to translate the sun.sun
next_setting
& next_rising
into a short time format, to display it in a Badge. As of v2021.12 of HA the sensors have stopped working, while the template seems valid and working.
This should not be impacted by the breaking change to timestamp_local
and timestamp_utc
Anyone any idea why this template works, when testing it in the Developer Tools Template editor and doesn’t for my 2 sunset/sunrise sensors?
# Sunrise & Sunset time
- sensor:
- name: "Sunrise"
unit_of_measurement: ^
icon: mdi:weather-sunset-up
device_class: timestamp
state: >
{{ as_timestamp(states.sun.sun.attributes.next_rising) | timestamp_custom("%H:%M") }}
- name: "Sunset"
unit_of_measurement: ˅
icon: mdi:weather-sunset-down
device_class: timestamp
state: >
{{ as_timestamp(states.sun.sun.attributes.next_setting) | timestamp_custom("%H:%M") }}