Skip to content

Add air-quality-pollen-alert ability: proactive AQI and pollen monitor for allergy and asthma sufferers#284

Closed
hassan1731996 wants to merge 4 commits into
openhome-dev:devfrom
hassan1731996:feature/air-quality-pollen-alert
Closed

Add air-quality-pollen-alert ability: proactive AQI and pollen monitor for allergy and asthma sufferers#284
hassan1731996 wants to merge 4 commits into
openhome-dev:devfrom
hassan1731996:feature/air-quality-pollen-alert

Conversation

@hassan1731996

Copy link
Copy Markdown
Contributor

Summary

  • Proactive air quality and pollen monitor personalized to the user's health conditions (asthma, hay fever, COPD)
  • Two unique daemon alert windows: morning briefing + evening-before prep warning when tomorrow is forecast bad
  • On-demand activity safety, window advice, and 2-day forecast — all condition-aware via LLM

What's included

main.py — 6-intent foreground

  • SETUP — guided voice setup: city, morning time, health conditions, pollen triggers
  • CHECK — on-demand AQI + pollen with personalized LLM advice
  • FORECAST — today and tomorrow outlook
  • ACTIVITY — "is it safe to run?" with best outdoor time window
  • WINDOWS — "should I keep windows closed?" with pollen-aware response

background.py — 5-minute daemon, two alert windows

  • Morning alert at user's set time: fires when AQI ≥ threshold; condition-aware 3-sentence briefing with best outdoor window
  • Evening prep alert at 8pm: fires when tomorrow is forecast bad; tells user to take antihistamine tonight so it works by morning
  • Both fire once per day; in-memory date deduplication prevents double-firing

Key differentiators vs Alexa

Feature Alexa This ability
Air quality On-demand AQI number Proactive morning + evening-before prep
Pollen Not available Grass, tree, weed — hourly breakdown
Personalization None Tailored to user's conditions and pollen triggers
Advice "AQI is 87" "For your hay fever, stay indoors until after 6pm"
Activity guidance None Direct yes/no + best time window
Evening prep None Night-before warning to take preventive medication

APIs

  • Open-Meteo Air Quality API — free, no key, global
  • Open-Meteo Geocoding API — free, no key

Validation

✅ All checks passed (validate_ability.py)

@hassan1731996 hassan1731996 requested a review from a team as a code owner June 20, 2026 20:13
@github-actions

github-actions Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

🔀 Branch Merge Check

PR direction: feature/air-quality-pollen-alertdev

Passedfeature/air-quality-pollen-alertdev is a valid merge direction

@github-actions

github-actions Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

✅ Community PR Path Check — Passed

All changed files are inside the community/ folder. Looks good!

@github-actions

github-actions Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

🔍 Lint Results

__init__.py — Empty as expected

Files linted: community/air-quality-pollen-alert/background.py community/air-quality-pollen-alert/main.py

✅ Flake8 — Passed

✅ All checks passed!

@github-actions github-actions Bot added the community-ability Community-contributed ability label Jun 20, 2026
@github-actions

github-actions Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

✅ Ability Validation Passed

📋 Validating: community/air-quality-pollen-alert
  ✅ All checks passed!

@abubakarabbasi

Copy link
Copy Markdown

I tested the ability, and its setup flow is not functioning correctly.

When I start the setup, it asks for the city. After I provide it, the ability responds with:

"I don't have your location set up yet. Say 'set up air quality' to get started."

This creates a setup loop and prevents the ability from being configured successfully.

Could you please attach a working demo showing the complete setup flow and expected behavior?

@hassan1731996

hassan1731996 commented Jul 4, 2026

Copy link
Copy Markdown
Contributor Author

Hey, thanks for testing - that bug was real in an earlier version and has since been fixed.

The setup flow was redesigned. The old version asked for the city as a follow-up question, which is where that loop came from. The city now goes directly in the trigger phrase:

"Set up air quality for Ottawa"

The ability extracts the city, geocodes it, and confirms in one step. No follow-up question, no loop.

I've recorded a live testing video on the editor showing the full end-to-end flow - setup, current check, forecast, activity advice, windows recommendation, and the update settings flow all working.

I've also opened a new PR (#288) with all the fixes and an updated description.
Demo: https://mega.nz/file/actVRRJR#5cENjjRRFfa6jHFGqtpt1kUKWk-MEhbRJ0QlK7MD1AI
Let me know if you need anything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-ability Community-contributed ability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants