Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add Air Pollution in OpenWeatherMap and clarify availables modes #39435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: next
Choose a base branch
from

Conversation

wittypluck
Copy link
Contributor

@wittypluck wittypluck commented Jun 8, 2025

Proposed change

Update OpenWeatherMap documentation to add Air Pollution and clarify the different available modes.

Type of change

  • Spelling, grammar or other readability improvements (current branch).
  • Adjusted missing or incorrect information in the current documentation (current branch).
  • Added documentation for a new integration I'm adding to Home Assistant (next branch).
  • Added documentation for a new feature I'm adding to Home Assistant (next branch).
  • Removed stale or deprecated documentation.

Additional information

Checklist

  • This PR uses the correct branch, based on one of the following:
    • I made a change to the existing documentation and used the current branch.
    • I made a change that is related to an upcoming version of Home Assistant and used the next branch.
  • The documentation follows the Home Assistant documentation standards.

Summary by CodeRabbit

  • Documentation
    • Updated OpenWeatherMap integration documentation to include support for air quality data.
    • Clarified API key registration requirements and distinguished between available API services.
    • Noted deprecation of API v2.5 and updated its support status.
    • Updated configuration options to reflect new and removed modes.
    • Added details on supported air quality conditions and pollutant metrics.

@wittypluck wittypluck requested a review from fabaff as a code owner June 8, 2025 22:25
@home-assistant home-assistant bot added has-parent This PR has a parent PR in a other repo next This PR goes into the next branch labels Jun 8, 2025
Copy link

netlify bot commented Jun 8, 2025

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit 0e2dec8
🔍 Latest deploy log https://app.netlify.com/projects/home-assistant-docs/deploys/6847118ffff6b70008676f52
😎 Deploy Preview https://deploy-preview-39435--home-assistant-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

coderabbitai bot commented Jun 8, 2025

📝 Walkthrough

Walkthrough

The OpenWeatherMap integration documentation was revised to include support for air quality data, clarify API key requirements, distinguish between available API services, remove references to deprecated API v2.5, and add configuration details for air quality features. Section headings and supported air quality conditions were also updated.

Changes

File Change Summary
source/_integrations/openweathermap.markdown Updated documentation: added air quality data support, clarified API/service details, updated configuration options, removed deprecated API references, revised headings, and listed supported air quality conditions.

Sequence Diagram(s)

sequenceDiagram
    User->>OpenWeatherMap Integration: Configure integration (select weather and/or air quality)
    OpenWeatherMap Integration->>OpenWeatherMap API: Request data (weather and/or air pollution)
    OpenWeatherMap API-->>OpenWeatherMap Integration: Return requested data
    OpenWeatherMap Integration-->>User: Display weather and air quality information
Loading

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🔭 Outside diff range comments (1)
source/_integrations/openweathermap.markdown (1)

106-111: ⚠️ Potential issue

Remove obsolete v2.5 reference in action note
The action still mentions failure for v2.5, but that mode is deprecated and removed from the config table. Update to reference only the supported modes:

- **Note:** Minute forecast is available only when the OWM integration mode is set to `v3.0`. The action will fail if the mode is set to `current`, `forecast`, or `v2.5`.
+ **Note:** Minute forecast is available only when the OWM integration mode is set to `v3.0`. The action will fail if the mode is set to `current` or `forecast`.
🧹 Nitpick comments (4)
source/_integrations/openweathermap.markdown (4)

31-31: Clarify API key phrasing
The sentence is a bit awkward. Consider rephrasing for clarity:

- You need an API key, it requires a [registration](https://home.openweathermap.org/users/sign_up).
+ You need to register for an API key: [Sign up here](https://home.openweathermap.org/users/sign_up).

43-43: Polish deprecation notice wording
Recommend slight wording tweak for flow:

- OpenWeatherMap API V2.5 has been deprecated and is not supported anymore by this integration.
+ OpenWeatherMap API V2.5 has been deprecated and is no longer supported by this integration.

68-68: Enhance v3.0 mode description
The v3.0 mode should mention current weather alongside forecasts—align with One Call API 3.0 capabilities:

- `<li>\`v3.0\` (new API version) daily weather forecast for 8 days, and 1-hour steps for 48 hours</li>`
+ `<li>\`v3.0\` (new API version): current weather plus hourly forecast for 48 hours and daily forecast for 8 days</li>`

264-273: Fix grammar in PM2.5 description
Minor wording correction for accuracy:

-| `pm2_5`             | Concentration of PM2.5 (Fine particles matter), µg/m³.                                  |
+| `pm2_5`             | Concentration of PM2.5 (fine particulate matter), µg/m³.                                  |
🧰 Tools
🪛 LanguageTool

[uncategorized] ~272-~272: Possible missing preposition found.
Context: ... Concentration of PM2.5 (Fine particles matter), µg/m³. ...

(AI_HYDRA_LEO_MISSING_OF)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 9419017 and 5d4cc81.

📒 Files selected for processing (1)
  • source/_integrations/openweathermap.markdown (5 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/openweathermap.markdown

[uncategorized] ~272-~272: Possible missing preposition found.
Context: ... Concentration of PM2.5 (Fine particles matter), µg/m³. ...

(AI_HYDRA_LEO_MISSING_OF)

🔇 Additional comments (4)
source/_integrations/openweathermap.markdown (4)

24-24: Update intro to include air quality data
Good addition—this now clearly states that both meteorological and air quality data are provided.


32-36: Approve supported service types list
The distinction between One Call API 3.0 and the Free tier (including air pollution) is clear and accurate.


45-45: Approve migration instructions heading
The guidance to migrate from API V2.5 is clear and actionable.


260-262: Approve new air quality section header
Introducing “Supported Air Quality conditions” as a standalone section aligns well with the rest of the documentation structure.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (6)
source/_integrations/openweathermap.markdown (6)

24-24: Reduce redundant branding in description
The phrase “The OpenWeatherMap weather integration uses [OpenWeatherMap]…” mentions the service name twice. Consider simplifying to “This integration uses [OpenWeatherMap] as a source for current meteorological and air quality data.”


31-31: Clarify API key registration details
Recommend noting that obtaining an API key is free by default and that the key activates within 10–120 minutes. This helps set expectations for new users.


33-37: Streamline service type descriptions
The two bullet points could be folded into a single table or use sub-lists for better readability. For example:
• One Call API 3.0 (subscription; current, 48-hour hourly, 8-day daily)
• Free tier (current, 3-hour 5-day forecast, air pollution)


44-46: Unify version identifier formatting
Wrap version IDs in backticks and match casing to the Mode table. E.g.:

  • OpenWeatherMap API v2.5 has been deprecated and is no longer supported.
  • Use v3.0 instead of “API V3.0” for consistency.

69-69: Improve Mode table readability
The long <li> list in a single cell is hard to scan. Consider breaking into separate lines or sub-bullets in markdown for each mode.


265-274: Correct terminology for particulate matter
Line 273 reads “Fine particles matter” but should be “Fine particulate matter” to align with standard nomenclature.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~273-~273: Possible missing preposition found.
Context: ... Concentration of PM2.5 (Fine particles matter), µg/m³. ...

(AI_HYDRA_LEO_MISSING_OF)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 5d4cc81 and 0e2dec8.

📒 Files selected for processing (1)
  • source/_integrations/openweathermap.markdown (5 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/openweathermap.markdown

[uncategorized] ~273-~273: Possible missing preposition found.
Context: ... Concentration of PM2.5 (Fine particles matter), µg/m³. ...

(AI_HYDRA_LEO_MISSING_OF)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Redirect rules - home-assistant-docs
  • GitHub Check: Header rules - home-assistant-docs
  • GitHub Check: Pages changed - home-assistant-docs
🔇 Additional comments (5)
source/_integrations/openweathermap.markdown (5)

107-107: Verify heading level consistency for Actions section
This was demoted to ###. Ensure other integrations follow the same level for action definitions (usually ##).


130-130: Verify heading level consistency for Examples section
The “Examples” heading is now ###. Confirm that examples across docs maintain the correct hierarchy relative to “Action”.


260-260: Approve nested examples within collapsible block
Collapsing the example under a details block improves readability while keeping the page concise.


261-261: Approve addition of Supported Air Quality section
The new section clearly introduces the air quality feature.


263-263: Approve Current Air Quality subsection heading
Level-3 heading correctly scopes the new content under Air Quality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has-parent This PR has a parent PR in a other repo next This PR goes into the next branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant