Pollen tracker in Wunderground plugin [solved]

Are you a wizard?! Thank you so much for your code. And how the heck did you find those API links?

Here’s the setup that worked for me, just in case anyone else reading and wondering (replace ZIPCODE with your zipcode):

sensor:
  - platform: yr
    monitored_conditions:
      - temperature
      - symbol
  - platform: rest
    name: pollen
    resource: https://www.pollen.com/api/forecast/current/pollen/ZIPCODE
    #note: API link is not accessable by web browser, this is normal
    value_template: "{{value_json.Location.periods[1].Index}}"
    scan_interval: 21600
    headers:
       Referer: "https://www.pollen.com"
       
  - platform: template
    sensors:
      pollen_level:
        friendly_name: 'Pollen Level'
        value_template: >-
          {%- if states.sensor.pollen.state|float <= 2.4 %}
              Low
          {%- elif states.sensor.pollen.state|float <= 4.8 %}
              Med/Low
          {%- elif states.sensor.pollen.state|float <= 7.2 %}
              Med
          {%- elif states.sensor.pollen.state|float <= 9.6 %}
              Med/High
          {%- elif states.sensor.pollen.state|float <= 12.0 %}
              High
          {% else %}
              Unknown
          {%- endif %}

I also added a line to my homeassistant:customize: area

  customize:
    switch.porch_light:
        friendly_name: Porch Light
        icon: mdi:lightbulb-on-outline
    sensor.yr_symbol:
        friendly_name: Weather
    sensor.yr_temperature:
        friendly_name: Outside
    sun.sun:
        friendly_name: Solar angle
    sensor.pollen:
        hidden: true
    sensor.pollen_level:
        friendly_name: "Pollen"
5 Likes