I am working with a very simple template, that looks like this:
template:
- sensor:
- name: "nextsunrise"
friendly_name: "Next Sunrise"
value_template: >
{{ as_timestamp(states.sun.sun.attributes.next_rising) | timestamp_custom(' %I:%M %p') | replace(" 0", "") }}
icon_template: mdi:weather-sunset-up
The entity sun.sun does exist, and the attribute next_rising also exists, with a valid value. When I put the template into the the Template Editor, the correct value is returned. HOWEVER - the sensor “sensor.nextsunrise” does not get created. I cannot find it using STATES, nor can I find it when trying to use that value in a dashboard. I’ve been looking through the documentation, and I cannot seem to figure out where I’m screwing this up. Help?
Sean
6 posts - 2 participants