Template help temperature error

Hi

I am trying to get this template working, however it is not for some reason.

I have checked if the weather.dark_sky has the temperature attribute and it does. Here is my template:

          Today it will be {{state_attr('weather.dark_sky',
          'forecast')['condition']}}. You should wear   {% if
          state_attr('weather.dark_sky', 'forecast')['temperature'] > 20 -%}
          {%- endif %}
            flipflop

and the error:

UndefinedError: 'list object' has no attribute 'temperature'

Any idea?

forescast has probably more than one day… so try:

state_attr('weather.dark_sky', 'forecast')[0]['temperature']

Thank you @browetd :grinning: