How do you map weather icons for smoke and haze and any other exceptional weather condition?

like this template…

template:
  - weather:
      - name: "NWS Enhanced Weather"
        condition: >
          {% set current = state_attr('weather.home', 'forecast').condition | default('exceptional') | lower %}
          {% if 'smoke' in current %} smoke
          {% elif 'haze' in current %} haze
          {% else %} {{ states('weather.home') }}
          {% endif %}
        
        # Mapping future forecast rows to lowercase so they strictly match your PNG names
        forecast_daily: >
          {% set orig_forecast = state_attr('weather.home', 'forecast') %}
          {% if orig_forecast %}
            {% set ns = namespace(entries=[]) %}
            {% for item in orig_forecast %}
              {% set cond = item.condition | lower %}
              {% if 'smoke' in cond %} {% set cond = 'smoke' %}
              {% elif 'haze' in cond %} {% set cond = 'haze' %}
              {% endif %}
              {% set ns.entries = ns.entries + [dict(item, condition=cond)] %}
            {% endfor %}
            {{ ns.entries }}
          {% else %}
            []
          {% endif %}

Is that actually working? The forecast state attribute was removed from most weather integrations like 3 years ago…

As to the icon, you just map the icons to the state value using the icon configuration variable:

Also, you are missing the temperature and humidity configuration variables, which are required.

nope

Logger: homeassistant.config
Source: config.py:352
First occurred: 9:29:44 AM (9 occurrences)
Last logged: 10:03:08 AM

    Invalid config for 'template' at configuration.yaml, line 59: required key 'condition_template' not provided Invalid config for 'template' at configuration.yaml, line 59: required key 'humidity_template' not provided Invalid config for 'template' at configuration.yaml, line 59: required key 'temperature_template' not provided Invalid config for 'template' at configuration.yaml, line 60: 'condition' is an invalid option for 'template', check: weather->0->condition Invalid config for 'template' at configuration.yaml, line 75: 'forecast_daily' is an invalid option for 'template', check: weather->0->forecast_daily
    Invalid config for 'template' at configuration.yaml, line 79: 'forecast_daily' is an invalid option for 'template', check: weather->0->forecast_daily
    Invalid config for 'template' at configuration.yaml, line 59: required key 'humidity_template' not provided Invalid config for 'template' at configuration.yaml, line 59: required key 'temperature_template' not provided Invalid config for 'template' at configuration.yaml, line 79: 'forecast_daily' is an invalid option for 'template', check: weather->0->forecast_daily
    Invalid config for 'template' at configuration.yaml, line 70: 'forecast_daily' is an invalid option for 'template', check: weather->0->forecast_daily
    Invalid config for 'template' at configuration.yaml, line 59: required key 'condition_template' not provided Invalid config for 'template' at configuration.yaml, line 59: required key 'humidity_template' not provided Invalid config for 'template' at configuration.yaml, line 59: required key 'temperature_template' not provided Invalid config for 'template' at configuration.yaml, line 61: 'condition_template' is an invalid option for 'template', check: condition_template Invalid config for 'template' at configuration.yaml, line 67: 'temperature_template' is an invalid option for 'template', check: temperature_template Invalid config for 'template' at configuration.yaml, line 68: 'humidity_template' is an invalid option for 'template', check: humidity_template Invalid config for 'template' at configuration.yaml, line 71: 'forecast_daily_template' is an invalid option for 'template', check: forecast_daily_template

Is the “nope” in response to my question or the suggestion to add icon?

Post the config… based on the errors it looks like you’ve indented something incorrectly.

nope it does not work. and the config is in my first post.

As you were told. ^^

Does your weather entity actually have a forecast state attribute?

If it doesn’t then you will need to use a trigger-based Template Weather that calls the weather.get_forecasts action, as shown in the docs. If you search this forum for that action, you will find numerous examples.

it is not possible with nws intergreation. I will have to write my own weather intergretion that get all weather conditions.

Template weather definitely does work with the NWS integration as a source…

Go to the (dev) tools and to the actions tab. Run the get_forecasts action and show us what you get.

  condition: exceptional  is the reason!!!!!   
weather.test4_keat:
  forecast:
    - datetime: '2026-08-16T23:00:00-07:00'
      precipitation_probability: 1
      is_daytime: false
      condition: exceptional
      wind_bearing: 315
      temperature: 66
      wind_speed: 9
    - datetime: '2026-08-17T06:00:00-07:00'
      precipitation_probability: 1
      is_daytime: true
      condition: exceptional
      wind_bearing: 225
      temperature: 92
      wind_speed: 4.5
    - datetime: '2026-08-17T18:00:00-07:00'
      precipitation_probability: 1
      is_daytime: false
      condition: exceptional
      wind_bearing: 315
      temperature: 66
      wind_speed: 8.5
    - datetime: '2026-08-18T06:00:00-07:00'
      precipitation_probability: 0
      is_daytime: true
      condition: partlycloudy
      wind_bearing: 315
      temperature: 91
      wind_speed: 12.5
    - datetime: '2026-08-18T18:00:00-07:00'
      precipitation_probability: 0
      is_daytime: false
      condition: partlycloudy
      wind_bearing: 315
      temperature: 63
      wind_speed: 14
    - datetime: '2026-08-19T06:00:00-07:00'
      precipitation_probability: 0
      is_daytime: true
      condition: partlycloudy
      wind_bearing: 225
      temperature: 89
      wind_speed: 6
    - datetime: '2026-08-19T18:00:00-07:00'
      precipitation_probability: 0
      is_daytime: false
      condition: partlycloudy
      wind_bearing: 270
      temperature: 66
      wind_speed: 6.5
    - datetime: '2026-08-20T06:00:00-07:00'
      precipitation_probability: 0
      is_daytime: true
      condition: partlycloudy
      wind_bearing: 45
      temperature: 92
      wind_speed: 6
    - datetime: '2026-08-20T18:00:00-07:00'
      precipitation_probability: 4
      is_daytime: false
      condition: partlycloudy
      wind_bearing: 270
      temperature: 69
      wind_speed: 5
    - datetime: '2026-08-21T06:00:00-07:00'
      precipitation_probability: 7
      is_daytime: true
      condition: cloudy
      wind_bearing: 45
      temperature: 93
      wind_speed: 6.5
    - datetime: '2026-08-21T18:00:00-07:00'
      precipitation_probability: 17
      is_daytime: false
      condition: rainy
      wind_bearing: 270
      temperature: 67
      wind_speed: 11
    - datetime: '2026-08-22T06:00:00-07:00'
      precipitation_probability: 17
      is_daytime: true
      condition: rainy
      wind_bearing: 315
      temperature: 86
      wind_speed: 15.5
    - datetime: '2026-08-22T18:00:00-07:00'
      precipitation_probability: 11
      is_daytime: false
      condition: partlycloudy
      wind_bearing: 270
      temperature: 62
      wind_speed: 14
    - datetime: '2026-08-23T06:00:00-07:00'
      precipitation_probability: 4
      is_daytime: true
      condition: partlycloudy
      wind_bearing: 270
      temperature: 85
      wind_speed: 6.5

When you give terse, low-information responses it makes it harder for us to help.

We understand that you want to replace exceptional with smoke and haze when appropriate, but where are you getting that data?

I am getting data from the nws integration.