Hi all,
See logbook details below:
Logger: homeassistant.helpers.template
Source: helpers/template.py:1862
First occurred: 15:45:57 (4122 occurrences)
Last logged: 21:31:57
* Template variable error: 'None' has no attribute 'Tree' when rendering '{{ state_attr("sensor.pollen_data", "Species").Tree.Plane }} /m³'
* Template variable error: 'None' has no attribute 'Weed' when rendering '{{ state_attr("sensor.pollen_data", "Species").Weed.Chenopod }} /m³'
* Template variable error: 'None' has no attribute 'Weed' when rendering '{{ state_attr("sensor.pollen_data", "Species").Weed.Mugwort }} /m³'
* Template variable error: 'None' has no attribute 'Weed' when rendering '{{ state_attr("sensor.pollen_data", "Species").Weed.Nettle }} /m³'
* Template variable error: 'None' has no attribute 'Weed' when rendering '{{ state_attr("sensor.pollen_data", "Species").Weed.Ragweed }} /m³'
There was something with float or something… finally wanna get rid of this issue… anyone got a clue ?
Codes as follows:
pollen_onkruiden:
friendly_name: Onkruiden
icon_template: mdi:grass
value_template: >-
{% set state = state_attr("sensor.pollen_data", "Risk").weed_pollen %}
{% if state == "Low" %} Weinig
{% elif state == "Moderate"%} Matig
{% elif state == "High"%} Hoog
{% elif state == "Very High"%} Zeer hoog
{% else %}Onbekend{% endif %}
attribute_templates:
Totaal: >-
{{ state_attr("sensor.pollen_data", "Count").weed_pollen }} /m³
Amaranten/Ganzenvoet: >-
{{ state_attr("sensor.pollen_data", "Species").Weed.Chenopod }} /m³
Bijvoet: >-
{{ state_attr("sensor.pollen_data", "Species").Weed.Mugwort }} /m³
Brandnetel: >-
{{ state_attr("sensor.pollen_data", "Species").Weed.Nettle }} /m³
Ambrosia: >-
{{ state_attr("sensor.pollen_data", "Species").Weed.Ragweed }} /m³
Thx in advance,
Kr,
Bart