Having a sensor usage problem in my config yaml

Having issue with the config yaml. Grouping of sensor/sensors to function correctly.
Logger: homeassistant.config
Source: config.py:978
First occurred: 9:39:46 PM (1 occurrences)
Last logged: 9:39:46 PM

Invalid config for [template]: expected dictionary for dictionary value @ data[‘sensors’]. Got None extra keys not allowed @ data[‘nextsunrise’]. Got {‘friendly_name’: ‘Next Sunrise’, ‘value_template’: ‘{{ as_timestamp(states.sun.sun.attributes.next_rising) | timestamp_custom(’ %I:%M %p’) | replace(" 0", “”) }}\n’, ‘icon_template’: ‘mdi:weather-sunset-up’} extra keys not allowed @ data[‘nextsunset’]. Got {‘friendly_name’: ‘Next Sunset’, ‘value_template’: ‘{{ as_timestamp(states.sun.sun.attributes.next_setting) | timestamp_custom(’ %I:%M %p’) | replace(" 0", “”) }}\n’, ‘icon_template’: ‘mdi:weather-sunset-down’}. (See /config/configuration.yaml, line 34).

# Sun Rise Sun Set    

template:
    - sensors:
      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
      nextsunset:
        friendly_name: 'Next Sunset'
        value_template: >
          {{ as_timestamp(states.sun.sun.attributes.next_setting) | timestamp_custom(' %I:%M %p') | replace(" 0", "") }}
        icon_template: mdi:weather-sunset-down

# Conversion Sensors for Pollen

    - sensor:
        - name: TPS Color
          state : >
                {% if states("sensor.tomorrow_io_kish_home_tree_pollen_index") == 'none' %}
                1
                 {% elif states("sensor.tomorrow_io_kish_home_tree_pollen_index") == 'very_low' %}
                2
                {% elif states("sensor.tomorrow_io_kish_home_tree_pollen_index") == 'low' %}
                3
                {% elif states("sensor.tomorrow_io_kish_home_tree_pollen_index") == 'medium' %}
                4
                {% elif states("sensor.tomorrow_io_kish_home_tree_pollen_index") == 'high' %}
                5
                {% elif states("sensor.tomorrow_io_kish_home_tree_pollen_index") == 'very_high' %}
                6
                {% endif %}
      
    - sensor:
        - name: GPS Color
          state : >
                {% if states("sensor.tomorrow_io_kish_home_grass_pollen_index") == 'none' %}
                1
                {% elif states("sensor.tomorrow_io_kish_home_grassen_index") == 'very_low' %}
                2
                {% elif states("sensor.tomorrow_io_kish_home_grass_pollen_index") == 'low' %}
                3
                {% elif states("sensor.tomorrow_io_kish_home_grass_pollen_index") == 'medium' %}
                4
                {% elif states("sensor.tomorrow_io_kish_home_grass_pollen_index") == 'high' %}
                5
                {% elif states("sensor.tomorrow_io_kish_home_grass_pollen_index") == 'very_high' %}
                6
                {% endif %}
            
    - sensor:
        - name: WPS Color
          state : >
                {% if states("sensor.tomorrow_io_kish_home_weed_pollen_index") == 'none' %}
                1
                {% elif states("sensor.tomorrow_io_kish_home_weed_pollen_index") == 'very_low' %}
                2
                {% elif states("sensor.tomorrow_io_kish_home_weed_pollen_index") == 'low' %}
                3
                {% elif states("sensor.tomorrow_io_kish_home_weed_pollen_index") == 'medium' %}
                4
                {% elif states("sensor.tomorrow_io_kish_home_weed_pollen_index") == 'high' %}
                5
                {% elif states("sensor.tomorrow_io_kish_home_weed_pollen_index") == 'very_high' %}
                6
                {% endif %}

From reading there is a new way to use templates, so you don’t use platform: template, but that throws the error above.

Going with it, I can’t get indenting to pass config check and so config will not start. Any wizard of HA out there?

template:
  - sensor:
      - name: Next Sunrise
        state: >
          {{ (states('sensor.sun_next_rising') | as_datetime | as_local).strftime('%-I:%M %p') }}
        icon: mdi:weather-sunset-up
      - name: Next Sunset
        state: >
          {{ (states('sensor.sun_next_setting') | as_datetime | as_local).strftime('%-I:%M %p') }}
        icon: mdi:weather-sunset-down
      - name: TPS Color
        state : >
          {{ { 'none': 1, 'very_low': 2, 'low': 3, 'medium': 4, 'high': 5, 'very_high': 6 }.get(states('sensor.tomorrow_io_kish_home_tree_pollen_index'), 'unknown') }}
      - name: GPS Color
        state : >
          {{ { 'none': 1, 'very_low': 2, 'low': 3, 'medium': 4, 'high': 5, 'very_high': 6 }.get(states('sensor.tomorrow_io_kish_home_grass_pollen_index'), 'unknown') }}
      - name: WPS Color
        state : >
          {{ { 'none': 1, 'very_low': 2, 'low': 3, 'medium': 4, 'high': 5, 'very_high': 6 }.get(states('sensor.tomorrow_io_kish_home_weed_pollen_index'), 'unknown') }}

Thank you very much Sir!
Everything I found was using the old “- platform: template”. Mixing those was causing issues. Also could not find how to stack multiple sensors in the config yaml either. The docs really need to be updated with all the new changes. New Examples too!
See that you use the new way to set states also.