Closed brianjking closed 6 years ago
- platform: rest
name: pollen
resource: https://www.pollen.com/api/forecast/current/pollen/60640
value_template: "{{value_json.Location.periods[1].Index}}"
scan_interval: 21600
headers:
Referer: "https://www.pollen.com"
- platform: rest
name: cold_flu
resource: https://www.pollen.com/api/forecast/extended/cold/60640
value_template: "{{value_json.Location.periods[0].Index}}"
scan_interval: 21600
headers:
Referer: "https://www.pollen.com"
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 %}
Medium-Low
{%- elif states.sensor.pollen.state|float <= 7.2 %}
Medium
{%- elif states.sensor.pollen.state|float <= 9.6 %}
Medium-High
{%- elif states.sensor.pollen.state|float <= 12.0 %}
High
{% else %}
Unknown
{%- endif %}
cold_flu_risk:
friendly_name: 'Cold & Flu Risk'
value_template: >-
{%- if states.sensor.cold_flu.state|float <= 2.4 %}
Low
{%- elif states.sensor.cold_flu.state|float <= 4.8 %}
Medium-Low
{%- elif states.sensor.cold_flu.state|float <= 7.2 %}
Medium
{%- elif states.sensor.cold_flu.state|float <= 9.6 %}
Medium-High
{%- elif states.sensor.cold_flu.state|float <= 12.0 %}
High
{% else %}
Unknown
{%- endif %}
Re: #126 & #118