Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 117795

Template help temperature error

$
0
0

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?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 117795

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>