Determine air quality: from a number to a quality index

Hi there,
I have a few air quality sensors that provide values for CO2, TVOC, PM2.5, PM10 and formaldehyde.
These sensors obviously provide numeric values which cannot be interpreted quickly.
How can I create a helper that based on 3 ranges assign an index to the sensors?

For example: create a new sensor based on the value of PM2.5 as follows:

  • Good: 0-12 µg/m³
  • Acceptable: 12-35 µg/m³
  • Poor: > 35 µg/m³

Thanks!

1 Like

Put this in your search engine:

site:home-assistant.io template to display words instead of numbers from sensor data

1 Like