Skip to content

Instantly share code, notes, and snippets.

@cassidyjames
Last active May 23, 2024 20:01
Show Gist options
  • Select an option

  • Save cassidyjames/ce3b48b06be34f62531c0716d2b8fd38 to your computer and use it in GitHub Desktop.

Select an option

Save cassidyjames/ce3b48b06be34f62531c0716d2b8fd38 to your computer and use it in GitHub Desktop.
US EPA PM2.5 Air Quality strings for Home Assistant
{% if states('sensor.indoor_pm2_5') | float <= 9.0 %}
Good
{% elif states('sensor.indoor_pm2_5') | float <= 35.4 %}
Moderate
{% elif states('sensor.indoor_pm2_5') | float <= 55.4 %}
Unhealthy for Sensitive Groups
{% elif states('sensor.indoor_pm2_5') | float <= 125.4 %}
Unhealthy
{% elif states('sensor.indoor_pm2_5') | float <= 225.4 %}
Very Unhealthy
{% else %}
Hazardous
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment