Day of the month missing, error in in configuration.yaml

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.

You likely have 2 entities with the same name and you reloaded, which created a second _2 entity and the first one is stale until you restart.

without unique_id’s, reloading will always create _2 entities.

If you want to avoid this, make these entities through the UI or add unique_id’s.

Thank you for your reply. I had spelled the entity wrong in my lovelace.