Skip to content

Add support for air quality api#1042

Merged
frenck merged 3 commits intofrenck:mainfrom
freundTech:feature-air-quality
Sep 17, 2025
Merged

Add support for air quality api#1042
frenck merged 3 commits intofrenck:mainfrom
freundTech:feature-air-quality

Conversation

@freundTech
Copy link
Contributor

@freundTech freundTech commented Jun 4, 2025

Proposed Changes

Add support for the air quality api endpoint

Related Issues

Home Assistant PR: home-assistant/core#146204

freundTech added a commit to freundTech/home-assistant-core that referenced this pull request Jun 5, 2025
This PR depends on an accompanying PR in the open_meteo package: frenck/python-open-meteo#1042
To keep this PR small it currently only adds state attributes to the
weather entity.

Future PRs can add support for those attributes to the forecast service
(though the air quality api only supports hourly data, so we would have
to calculate the daily data ourselfes based on that) and provide further
air quality metrics not supported by weather entities (such as pollen)
as sensor entities.
@freundTech freundTech marked this pull request as ready for review June 5, 2025 13:07
@github-actions
Copy link

github-actions bot commented Jul 6, 2025

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Jul 6, 2025
@freundTech
Copy link
Contributor Author

Not stale. Waiting for review.

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Jul 7, 2025
@github-actions
Copy link

github-actions bot commented Aug 7, 2025

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Aug 7, 2025
@freundTech
Copy link
Contributor Author

Not stale. Waiting for review.

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Aug 8, 2025
@github-actions
Copy link

github-actions bot commented Sep 8, 2025

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Sep 8, 2025
@freundTech
Copy link
Contributor Author

Not stale. Waiting for review.

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Sep 9, 2025
@frenck frenck requested a review from Copilot September 17, 2025 07:35
@frenck frenck added the new-feature New features or options. label Sep 17, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds support for the Open-Meteo Air Quality API by implementing air quality data models and client methods. This extends the existing weather API client to include air quality measurements like particulate matter, gases, pollen, and AQI values.

  • Implements comprehensive air quality parameter enums and data models
  • Adds air_quality method to OpenMeteo client class
  • Provides example usage demonstrating the new air quality functionality

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/open_meteo/open_meteo.py Adds air_quality method and imports for air quality functionality
src/open_meteo/models.py Defines air quality parameters enum and data models for current/hourly air quality data
src/open_meteo/init.py Exports new air quality classes in public API
examples/air_quality.py Provides example usage of the air quality API

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Owner

@frenck frenck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, @freundTech 👍

Thanks for the pull request ❤️

../Frenck

@frenck frenck merged commit bc22ab5 into frenck:main Sep 17, 2025
1 of 2 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

new-feature New features or options.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants