[DISCONTINUED] OzPoll - Australian Pollen Forecast (Integration)

I changed up the code to match latest HA standards:

    - name: Melbourne Pollen Forecast via API
      state: ''
      attributes:
        melbourne_6day_pollen_forecast: >-
          {% set forecastpageHTML = states.sensor.melbourne_pollen_api_html.attributes.forecastpage %}
          {% set LowerForecastpageHTML = forecastpageHTML|lower  %}
          {{ 
          '{\n' +
          LowerForecastpageHTML
          |replace('monday', 'Mon')
          |replace('tuesday', 'Tue')
          |replace('wednesday', 'Wed')
          |replace('thursday', 'Thu')
          |replace('friday', 'Fri')
          |replace('saturday', 'Sat')
          |replace('sunday', 'Sun')
          |replace('melbourne pollen forecast', '"days": [')
          |replace('<h2 ', '*nl*{*nl*"day_short_name":"<h1 ')
          |replace('</h2>', '</h2>",*nl* ')
          |replace('<p', '"date":"<p')
          |replace('p>', '<\/p>",*nl* ')
          |replace('<div class="pollen-forecast-level', '"pollen_level":"<<div class="pollen-forecast-level')
          |replace('low', 'Low"},')
          |replace('moderate', 'Moderate"},')
          |replace('high', 'High"},')
          |replace('extreme', 'Extreme"},')
          |striptags
          |replace('*nl*', '\n') + ']\n}'
          }} 

The sensor is showing LOW for Wednesday even though its HIGH:

The only LOW reading is east gippsland:

Is there a way to make the state of the sensor TODAY’s forecast only

1 Like