-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Expand AirGradient documentation #39464
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
Conversation
✅ Deploy Preview for home-assistant-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughThe AirGradient integration documentation was expanded with new sections, including use cases, supported devices, detailed supported functionality, update mechanisms, data update intervals, example automations, known limitations, and troubleshooting guidance. Existing content was reorganized and clarified to provide more comprehensive operational and usage information. Changes
Sequence Diagram(s)sequenceDiagram
User->>Documentation: Consults AirGradient integration docs
Documentation->>User: Provides use cases, supported devices, sensors, update info, examples, limitations, troubleshooting
User->>Home Assistant: Configures AirGradient integration based on documentation
Home Assistant->>AirGradient Device: Polls data every minute, checks for updates hourly
Home Assistant->>User: Notifies via automation if CO2 > 1000 ppm (as per example)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (2)
source/_integrations/airgradient.markdown (2)
53-57
: Consider aligning header naming with Home Assistant style
Currently using “Supported functionality” → “Available sensors”. The core docs often use “Supported entities” with sub-sections “Sensors” and “Configuration entities” (no “Available” prefix).Please verify against the documentation guidelines to ensure consistent section titles.
148-152
: Known limitations list needs surrounding blank lines & minor wording tweak
- Add a blank line after the bullet list to satisfy markdownlint (MD032).
- Consider changing “is not able to install” → “cannot install” for conciseness.
🧰 Tools
🪛 LanguageTool
[style] ~151-~151: As a shorter alternative for ‘able to’, consider using “can not”.
Context: ...lowing limitations: - The update entity is not able to install updates automatically. You will...(BE_ABLE_TO)
🪛 markdownlint-cli2 (0.17.2)
151-151: Lists should be surrounded by blank lines
null(MD032, blanks-around-lists)
📜 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
📒 Files selected for processing (1)
source/_integrations/airgradient.markdown
(4 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/airgradient.markdown
[style] ~151-~151: As a shorter alternative for ‘able to’, consider using “can not”.
Context: ...lowing limitations: - The update entity is not able to install updates automatically. You will...
(BE_ABLE_TO)
🪛 markdownlint-cli2 (0.17.2)
source/_integrations/airgradient.markdown
151-151: Lists should be surrounded by blank lines
null
(MD032, blanks-around-lists)
🔇 Additional comments (10)
source/_integrations/airgradient.markdown (10)
30-35
: Section “Use cases” is well structured
Great addition—list is concise, examples are clear, and blank lines around bullets follow markdown best practices.
36-41
: Supported devices list is accurate and formatted correctly
Device names are clear, and having a blank line before and after the list ensures good readability.
84-84
: Available configuration entities header is consistent
Header level and placement look good; it clearly separates sensors from config entities.
103-107
: Updates section clearly explains firmware workflow
Good to note the need for reboot after an update. Formatting and blank lines are correct.
108-115
: Data updates section is clear and follows polling conventions
Intervals for data and firmware checks are stated precisely. Blank lines and term usage are appropriate.
116-120
: Actions section is explicit
Even if no extra actions exist, having an “Actions” header prevents confusion by confirming there are none.
121-122
: Examples section header is properly placed
Blank line separation is correct, making it easy to locate the examples.
127-130
: Example automation description is clear
The trigger description and threshold are well explained.
131-146
: YAML snippet is valid and formatted correctly
Proper fencing, indentation, and templating syntax. It’s a useful starting point for users.
160-165
: Integration removal instructions are clear
Follows standard pattern; include blank line before the include statement for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (4)
source/_integrations/airgradient.markdown (4)
30-35
: Consistent bullet formatting in “Use cases”
The new bullets end with periods, whereas other lists (e.g., Supported devices) omit them. For consistency, remove the trailing periods:- - Monitor indoor and outdoor air quality. + - Monitor indoor and outdoor air quality - - Warn to open windows when CO2 levels are too high. + - Warn to open windows when CO2 levels are too high - - Control ventilation systems based on air quality. + - Control ventilation systems based on air quality
75-83
: Fix grammar in configuration‐entity sensor description
The sentence “instead of set it to control locally” is awkward. Update it to:A number of configuration entities are available as sensors to automate with if you control the device via the AirGradient dashboard instead of setting it to control locally.🧰 Tools
🪛 LanguageTool
[grammar] ~79-~79: This phrase is duplicated. You should probably use “LED bar” only once.
Context: ...nds learning offset - Data used for the LED bar - LED bar brightness - Display temperature unit -...(PHRASE_REPETITION)
🪛 markdownlint-cli2 (0.17.2)
76-76: Lists should be surrounded by blank lines
null(MD032, blanks-around-lists)
84-102
: Clarify “Available configuration entities” structure
This section partially overlaps with the preceding configuration‐entity sensors list. To reduce confusion, consider:
- Renaming the heading to simply “Configuration entities”.
- Grouping entities by type (number, select, switch) with subheadings.
- Adding a brief note that these are non-sensor domains.
150-152
: Refine wording and list formatting in limitations
- Insert a blank line before the list for readability.
- Change “is not able to install updates automatically” to “cannot install updates automatically”:
- The AirGradient integration currently has the following limitations: - - The update entity is not able to install updates automatically. You will need to reboot the device manually after installing the update. + The AirGradient integration currently has the following limitations: + + - The update entity cannot install updates automatically; you must reboot the device manually after installing the update.🧰 Tools
🪛 LanguageTool
[style] ~151-~151: As a shorter alternative for ‘able to’, consider using “can not”.
Context: ...lowing limitations: - The update entity is not able to install updates automatically. You will...(BE_ABLE_TO)
🪛 markdownlint-cli2 (0.17.2)
151-151: Lists should be surrounded by blank lines
null(MD032, blanks-around-lists)
📜 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
📒 Files selected for processing (1)
source/_integrations/airgradient.markdown
(4 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/airgradient.markdown
[style] ~151-~151: As a shorter alternative for ‘able to’, consider using “can not”.
Context: ...lowing limitations: - The update entity is not able to install updates automatically. You will...
(BE_ABLE_TO)
🪛 markdownlint-cli2 (0.17.2)
source/_integrations/airgradient.markdown
151-151: Lists should be surrounded by blank lines
null
(MD032, blanks-around-lists)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Lint Text
🔇 Additional comments (6)
source/_integrations/airgradient.markdown (6)
36-41
: Supported devices section looks good
The list of compatible AirGradient models is clear and concise.
53-56
: Supported functionality header is clear
The new section properly introduces the overview of entities provided by this integration.
103-107
: Updates section is accurate
Clearly explains the firmware update entity and reboot requirement.
108-115
: Data updates polling intervals are clear
Minute-based data fetch and hourly update checks are documented correctly.
116-120
: Actions section is correct
States that no additional actions exist beyond the entities.
153-159
: Troubleshooting steps look resolved
The previous typo has been fixed, and the steps are clear and actionable.
```yaml | ||
automation: | ||
- alias: "Notify when CO2 level is too high" | ||
triggers: | ||
- trigger: numeric_state | ||
entity_id: sensor.airgradient_carbon_dioxide | ||
above: 1000 | ||
|
||
actions: | ||
- action: notify.mobile_app_your_device | ||
data: | ||
title: "High CO2 Level Alert" | ||
message: > | ||
The CO2 level is too high at {{ states('sensor.airgradient_carbon_dioxide') }} ppm. | ||
Please consider ventilating the room. | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid YAML example for automations
The snippet uses incorrect keys (triggers:
, trigger:
, actions:
, action:
) and should align with Home Assistant’s schema. For example:
- automation:
- - alias: "Notify when CO2 level is too high"
- triggers:
- - trigger: numeric_state
- entity_id: sensor.airgradient_carbon_dioxide
- above: 1000
-
- actions:
- - action: notify.mobile_app_your_device
- data:
- title: "High CO2 Level Alert"
- message: >
- The CO2 level is too high at {{ states('sensor.airgradient_carbon_dioxide') }} ppm.
- Please consider ventilating the room.
+ automation:
+ - alias: "Notify when CO2 level is too high"
+ trigger:
+ - platform: numeric_state
+ entity_id: sensor.airgradient_carbon_dioxide
+ above: 1000
+ action:
+ - service: notify.mobile_app_your_device
+ data:
+ title: "High CO2 Level Alert"
+ message: >-
+ The CO2 level is too high at {{ states('sensor.airgradient_carbon_dioxide') }} ppm.
+ Please consider ventilating the room.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
```yaml | |
automation: | |
- alias: "Notify when CO2 level is too high" | |
triggers: | |
- trigger: numeric_state | |
entity_id: sensor.airgradient_carbon_dioxide | |
above: 1000 | |
actions: | |
- action: notify.mobile_app_your_device | |
data: | |
title: "High CO2 Level Alert" | |
message: > | |
The CO2 level is too high at {{ states('sensor.airgradient_carbon_dioxide') }} ppm. | |
Please consider ventilating the room. | |
``` | |
automation: | |
- alias: "Notify when CO2 level is too high" | |
trigger: | |
- platform: numeric_state | |
entity_id: sensor.airgradient_carbon_dioxide | |
above: 1000 | |
action: | |
- service: notify.mobile_app_your_device | |
data: | |
title: "High CO2 Level Alert" | |
message: >- | |
The CO2 level is too high at {{ states('sensor.airgradient_carbon_dioxide') }} ppm. | |
Please consider ventilating the room. |
🤖 Prompt for AI Agents
In source/_integrations/airgradient.markdown around lines 131 to 146, the YAML
keys for the automation are incorrect; specifically, 'triggers' should be
'trigger', and 'actions' should be 'action' to match Home Assistant's schema.
Fix the YAML by using singular keys 'trigger' and 'action' instead of plural
forms, ensuring the structure aligns with Home Assistant's expected automation
format.
There was a problem hiding this 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
♻️ Duplicate comments (1)
source/_integrations/airgradient.markdown (1)
131-148
: 🛠️ Refactor suggestionFix YAML example and wrap in raw tags
The automation example still uses plural keys (triggers
,actions
) andaction:
instead ofservice:
, and it lacks a proper{% raw %}
wrapper—this will break the rendered docs.-{% endraw %} -```yaml -automation: - - alias: "Notify when CO2 level is too high" - triggers: - - trigger: numeric_state - entity_id: sensor.airgradient_carbon_dioxide - above: 1000 - - actions: - - action: notify.mobile_app_your_device - data: - title: "High CO2 Level Alert" - message: > - The CO2 level is too high at {{ states('sensor.airgradient_carbon_dioxide') }} ppm. - Please consider ventilating the room. -``` +{% raw %} +```yaml +automation: + - alias: "Notify when CO2 level is too high" + trigger: + - platform: numeric_state + entity_id: sensor.airgradient_carbon_dioxide + above: 1000 + action: + - service: notify.mobile_app_your_device + data: + title: "High CO2 Level Alert" + message: >- + The CO2 level is too high at {{ states('sensor.airgradient_carbon_dioxide') }} ppm. + Please consider ventilating the room. +``` +{% endraw %}
🧹 Nitpick comments (2)
source/_integrations/airgradient.markdown (2)
30-35
: Refine 'Use cases' bullet phrasing for consistency
The second item could read “Warn you to open windows when CO2 levels are too high” to match the imperative tone of the other bullets.- - Warn to open windows when CO2 levels are too high. + - Warn you to open windows when CO2 levels are too high.
103-106
: Consider elaborating on the update entity usage
It may be helpful to include the actual entity ID or a sample service call (e.g.,update.async_install
) so users know how to trigger firmware updates via Home Assistant.
📜 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
📒 Files selected for processing (1)
source/_integrations/airgradient.markdown
(4 hunks)
🔇 Additional comments (1)
source/_integrations/airgradient.markdown (1)
53-56
: Supported functionality section looks good
Clear header and overview; the structure aligns with Home Assistant docs conventions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @joostlek 👍
There was a problem hiding this 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
♻️ Duplicate comments (1)
source/_integrations/airgradient.markdown (1)
131-148
:⚠️ Potential issueInvalid YAML example for automations
The example still uses the plural keystriggers
/actions
andaction:
instead of HA’s requiredtrigger
/action
andservice:
fields. This will not parse correctly.- triggers: - - trigger: numeric_state + trigger: + - platform: numeric_state entity_id: sensor.airgradient_carbon_dioxide above: 1000 - actions: - - action: notify.mobile_app_your_device + action: + - service: notify.mobile_app_your_device data: title: "High CO2 Level Alert" message: >- The CO2 level is too high at {{ states('sensor.airgradient_carbon_dioxide') }} ppm. Please consider ventilating the room.
🧹 Nitpick comments (3)
source/_integrations/airgradient.markdown (3)
53-59
: Consider simplifying heading names
To align with Home Assistant docs conventions, you might drop “Available” and rename:## Supported functionality ### Sensorsinstead of “### Available sensors.”
84-90
: Align heading to standard schema
Similarly, change:### Available configuration entities
to:
### Configuration entities
This keeps consistency with other integrations.
154-156
: Minor style and formatting nits in limitations list
- Surround the list with blank lines for better markdown compliance (MD032).
- Use “cannot” instead of “not able to” for brevity.
-The AirGradient integration currently has the following limitations: - - The update entity is not able to install updates automatically. You will need to reboot the device manually after installing the update. +The AirGradient integration currently has the following limitations: + +- The update entity cannot install updates automatically. You will need to reboot the device manually after installing the update. +🧰 Tools
🪛 LanguageTool
[style] ~155-~155: As a shorter alternative for ‘able to’, consider using “can not”.
Context: ...lowing limitations: - The update entity is not able to install updates automatically. You will...(BE_ABLE_TO)
🪛 markdownlint-cli2 (0.17.2)
155-155: Lists should be surrounded by blank lines
null(MD032, blanks-around-lists)
📜 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
📒 Files selected for processing (1)
source/_integrations/airgradient.markdown
(4 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/airgradient.markdown
[style] ~155-~155: As a shorter alternative for ‘able to’, consider using “can not”.
Context: ...lowing limitations: - The update entity is not able to install updates automatically. You will...
(BE_ABLE_TO)
🪛 markdownlint-cli2 (0.17.2)
source/_integrations/airgradient.markdown
155-155: Lists should be surrounded by blank lines
null
(MD032, blanks-around-lists)
⏰ 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 (2)
source/_integrations/airgradient.markdown (2)
30-35
: Use cases section looks great
The new “Use cases” header and bullet points clearly illustrate practical scenarios for this integration.
36-41
: Supported devices list is accurate and well-formatted
Good enumeration of the DIY, Indoor, and Outdoor AirGradient models.
Proposed change
Expand AirGradient documentation
Type of change
current
branch).current
branch).next
branch).next
branch).Additional information
Checklist
current
branch.next
branch.Summary by CodeRabbit