Skip to content

Show Open-Meteo air quality in the weather panel - #11390

Open
loraque-git wants to merge 1 commit into
omacom:quattrofrom
loraque-git:feat/weather-air-quality
Open

Show Open-Meteo air quality in the weather panel#11390
loraque-git wants to merge 1 commit into
omacom:quattrofrom
loraque-git:feat/weather-air-quality

Conversation

@loraque-git

Copy link
Copy Markdown

Why

The weather popup already uses Open-Meteo for the daily forecast. It does not show air quality. Several community weather plugins add an AQI cell; stock omarchy.weather still has none.

What

When Open-Meteo's air-quality API returns a reading, the current-conditions row grows an AIR cell next to humid (US AQI with imperial units, European AQI with metric). Unhealthy-and-worse uses the urgent color. If the fetch fails or there is no index, the cell stays hidden — same as a missing forecast.

Coordinates are the same stored or wttr nearest_area pair the daily forecast already uses (openMeteoCoordinates in Model.js). Retry matches the daily forecast: three attempts, 2.5s apart.

No extra bar icon, no new settings form. The cell is display-only.

Tests

bash test/shell.d/weather-test.sh — existing weather assertions plus:

  • stored vs wttr coordinates for Open-Meteo
  • US / European AQI bands
  • parse / invalid JSON
  • panel fetches air-quality-api.open-meteo.com and labels the cell AIR

Test plan

  • Open the weather popup with a pinned location: AIR cell appears with a category and number
  • Toggle metric/imperial: scale follows (European vs US)
  • Auto-detect (no pinned coordinates): AIR appears after wttr reports an area
  • Offline / failed air-quality fetch: FEELS / WIND / HUMID unchanged, no empty AIR cell

Add an AIR cell next to humid when the air-quality API returns US or
European AQI. Reuse the same stored or wttr coordinates as the daily
forecast fetch. The cell hides when there is nothing to show.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant