airq-dev / hazebot

Building the 411 for air quality in the United States: a texting platform accessible to all, that provides actionable local information to protect your and your community.
https://www.hazebot.org/
MIT License
9 stars 1 forks source link

Add preferences, starting with alerting_threshold #198

Closed ianhoffman closed 3 years ago

ianhoffman commented 3 years ago

Adds a new preferences column to the clients model. Then takes a first stab at creating a fairly generic way to define client preferences and set them via a new flow:

The only pref I've added so far is Alerting Threshold, defined as follows:

AQI category below which Hazebot won't send alerts. For example, if you set this to MODERATE, Hazebot won't send alerts when AQI transitions from GOOD to MODERATE or from MODERATE to GOOD.

I can foresee us adding new preferences like "Conversion Factor" (examples: LRAPA, USEPA) and "Schedule" (to control when you get alerts).

Here are some screenshots of the new flow:

IMG_2136 IMG_2137 IMG_2138