Can I get my temple sensor various states in the state dropdown?

So, I’ve set up a template sensor that defines the various times of the day according to my preferences. It mostly uses the sun2 integration and the current time. I use this to trigger various other things, such as lights and curtains, but I was wondering if there is a way to get the various states it supports in the state dropdown in the automation section. I tried using the option attribute, but apparently that’s not correct for template sensors…

  - platform: template
    sensors:
      time_of_day:
        friendly_name: "Time of day"
        unique_id: '3a2df494-95c6-441c-b16b-9bb1fdff33f9'
        value_template: >
          {% set time = now().strftime('%Y-%m-%dT%H:%M:%S%z') %}

          {% set startofday = now().strftime('%Y-%m-%d') + 'T00:00:00' + now().strftime('%z') %}
          
          {% set sunrisevaxjo = states('sensor.vaxjo_sunrise_2') | as_datetime  | as_local %}
          {% set sunrise = (as_timestamp(sunrisevaxjo) + 3600) | timestamp_custom('%Y-%m-%dT%H:%M:%S%z') %}
          
          {% set earliestdawn = now().strftime('%Y-%m-%d') + 'T05:00:00' + now().strftime('%z') %}

          {% set solarnoonvaxjo = states('sensor.vaxjo_solar_noon') | as_datetime  | as_local %}
          {% set solarnoon = (as_timestamp(solarnoonvaxjo) + 3600) | timestamp_custom('%Y-%m-%dT%H:%M:%S%z') %}
 
          {% set sunsetvaxjo = states('sensor.vaxjo_sunset_2') | as_datetime  | as_local %}
          {% set dusk = (as_timestamp(sunsetvaxjo) - 3600) | timestamp_custom('%Y-%m-%dT%H:%M:%S%z') %}
          {% set sunset = (as_timestamp(sunsetvaxjo)) | timestamp_custom('%Y-%m-%dT%H:%M:%S%z') %}

          {% set endofday = now().strftime('%Y-%m-%d') + 'T23:59:59' + now().strftime('%z') %}
          {% set startofday = now().strftime('%Y-%m-%d') + '00:00:00' + now().strftime('%z') %}

          {% if (startofday <= time < earliestdawn) %}
            Night
          {% elif (earliestdawn <= time < sunrise) %}
            Dawn
          {% elif (sunrise <= time < solarnoon) %}
            Morning
          {% elif (solarnoon <= time < dusk) %}
            Afternoon
          {% elif (dusk <= time < sunset) %}
            Dusk
          {% elif (sunset <= time <= endofday) %}
            Evening
          {% else %}
            Unknown
          {% endif %}

AFAIK, there is no mechanism to populate the UI editor’s state options for a Template Sensor. They are populated for Template Select entities, but that would be kind of a bodge.

FWIW, you’re doing a lot of unnecessary conversions…

- platform: template
    sensors:
      time_of_day:
        friendly_name: "Time of day"
        unique_id: '3a2df494-95c6-441c-b16b-9bb1fdff33f9'
        value_template: >
          {% set time = now() -%}
          {%- set earliestdawn = today_at('05:00:00') -%}
          {%- set sunrise = states('sensor.vaxjo_sunrise_2') | as_datetime | as_local + timedelta(hours=1) -%}
          {%- set solarnoon = states('sensor.vaxjo_solar_noon') | as_datetime | as_local + timedelta(hours=1) -%}
          {%- set sunset = states('sensor.vaxjo_sunset_2') | as_datetime | as_local -%}
          {%- set dusk = sunset - timedelta(hours=1) -%}

          {% if today_at() <= time < earliestdawn %}
            Night
          {% elif earliestdawn <= time < sunrise %}
            Dawn
          {% elif sunrise <= time < solarnoon %}
            Morning
          {% elif solarnoon <= time < dusk %}
            Afternoon
          {% elif dusk <= time < sunset %}
            Dusk
          {% elif sunset <= time <= today_at('23:59:59') %}
            Evening
          {% else %}
            Unknown
          {% endif %}

Thanks! Yea, I suspected I did. Still learning the yaml format and what data types are being returned.