import weewx.unitsdef category(vh):if vh.raw is None:result = "N/A"elif vh.raw < 50:result = "good"elif vh.raw < 100:result = "moderate"else:result = "bad"return resultweewx.units.ValueHelper.category = category
--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/487EFABB-872F-449C-A685-8BB5FD83EF98%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zEA-biYRcrTk__y2-Avam%2BcW9U0-z0iDjxc%2BdW%3DH-dkq1g%40mail.gmail.com.
<p>The air quality is $aq_category($current.aqi_pm2_51.raw)</p>
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/B6BE9719-0EC9-4DF2-A68A-A34A272CF1DA%40gmail.com.