I have this code:
template:
- sensor:
- name: "dayoftheweek"
state: >
{{ now().strftime("%A") }}
- name: "month"
state: >
{{ now().strftime("%B") }}
- name: "dayofthemonth"
state: >
{{ now().strftime('%-d') }}
- name: 'NextSunrise'
state: >
{{ as_timestamp(states.sun.sun.attributes.next_rising) | timestamp_custom(' %H:%M ') | replace(" 0", "") }}
icon: mdi:weather-sunset-up
- name: 'NextSunset'
state: >
{{ as_timestamp(states.sun.sun.attributes.next_setting) | timestamp_custom(' %H:%M ') | replace(" 0", "") }}
icon: mdi:weather-sunset-down
But it shows unknown in my lovelace frontend for the day of the month, month and day only works.