-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Add sensor platform to smhi #39307
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
Add sensor platform to smhi #39307
Conversation
✅ Deploy Preview for home-assistant-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughThe SMHI integration documentation was expanded and reorganized. New sections for weather and sensor entities were added, including a table of available sensors. Location restrictions and API documentation links were updated. Device type listings were removed, and a section on removing the integration was introduced. Changes
Sequence Diagram(s)No sequence diagram generated since the changes are limited to documentation updates. 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/smhi.markdown (2)
14-14
: Consistent alphabetical ordering for platforms (optional)
Currently the platforms are listed as:ha_platforms: - weather - sensorFor consistency with other integrations, consider alphabetizing the list:
-ha_platforms: - - weather - - sensor +ha_platforms: + - sensor + - weather
38-47
: Refine sensor table formatting
A few minor fixes to the table rows—remove the stray space before the period and hyphenate compound adjectives:-| Thunder probability | % | Probability of thunder . | +| Thunder probability | % | Probability of thunder. | -| Low cloud coverage | % | Mean value of low level cloud cover. | +| Low cloud coverage | % | Mean value of low-level cloud cover. | -| Medium cloud coverage | % | Mean value of medium level cloud cover. | +| Medium cloud coverage | % | Mean value of medium-level cloud cover. | -| High cloud coverage | % | Mean value of high level cloud cover. | +| High cloud coverage | % | Mean value of high-level cloud cover. |🧰 Tools
🪛 LanguageTool
[uncategorized] ~42-~42: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ... | % | Mean value of low level cloud cover. ...(EN_COMPOUND_ADJECTIVE_INTERNAL)
[uncategorized] ~44-~44: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ... | % | Mean value of high level cloud cover. ...(EN_COMPOUND_ADJECTIVE_INTERNAL)
📜 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/smhi.markdown
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/smhi.markdown
[uncategorized] ~42-~42: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ... | % | Mean value of low level cloud cover. ...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[uncategorized] ~44-~44: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ... | % | Mean value of high level cloud cover. ...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
⏰ 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 (7)
source/_integrations/smhi.markdown (7)
6-6
: Add “Sensor” category
Including “Sensor” underha_category
correctly surfaces this integration in the Sensor category in the documentation.
20-20
: Introduce bold integration term
The rephrased introduction uses the recommended bold‐term style for integrations and reads clearly.
30-33
: New “Weather” section
The Weather section is well scoped and clearly explains the entity’s capabilities.
34-37
: New “Sensors” section
Great addition of the Sensors section describing the extra entities.
48-48
: Confirm default‐off sensors note
The note that cloud sensors are not enabled by default is clear and accurate.
52-53
: Updated API documentation link
The link to the SMHI API docs now points to the introduction page. This looks correct.
54-56
: Add “Remove the integration” section
The new section and inclusion of the standard remove‐device snippet follow documentation conventions.
source/_integrations/smhi.markdown
Outdated
{% important %} | ||
|
||
Only location close to Sweden can be added. See [SMHI.se area](https://opendata.smhi.se/metfcst/pmp/geographic_area) for more details what locations are supported. | ||
|
||
- Weather | ||
{% endimportant %} |
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.
🛠️ Refactor suggestion
Fix grammar in the important note
The note has a few grammatical issues—use the plural “locations” and improve the preposition.
-{% important %}
-Only location close to Sweden can be added. See [SMHI.se area](https://opendata.smhi.se/metfcst/pmp/geographic_area) for more details what locations are supported.
-{% endimportant %}
+{% important %}
+Only locations close to Sweden can be added. See [SMHI.se area](https://opendata.smhi.se/metfcst/pmp/geographic_area) for more details on which locations are supported.
+{% endimportant %}
📝 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.
{% important %} | |
Only location close to Sweden can be added. See [SMHI.se area](https://opendata.smhi.se/metfcst/pmp/geographic_area) for more details what locations are supported. | |
- Weather | |
{% endimportant %} | |
{% important %} | |
Only locations close to Sweden can be added. See [SMHI.se area](https://opendata.smhi.se/metfcst/pmp/geographic_area) for more details on which locations are supported. | |
{% endimportant %} |
🤖 Prompt for AI Agents
In source/_integrations/smhi.markdown around lines 22 to 26, the important note
contains grammatical errors. Change "Only location close to Sweden can be added"
to "Only locations close to Sweden can be added" and improve the preposition by
replacing "close to Sweden" with "near Sweden" or "in the vicinity of Sweden"
for better clarity and correctness.
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, @gjohansson-ST 👍
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
🧹 Nitpick comments (2)
source/_integrations/smhi.markdown (2)
22-26
: Improve grammar and clarity in the important note
The note reads a bit awkwardly—let’s add a preposition and refine “close to” to “near” for better readability.-{% important %} -Only locations close to Sweden can be added. See [SMHI.se area](https://opendata.smhi.se/metfcst/pmp/geographic_area) for more details which locations are supported. -{% endimportant %} +{% important %} +Only locations near Sweden can be added. See [SMHI.se area](https://opendata.smhi.se/metfcst/pmp/geographic_area) for more details on which locations are supported. +{% endimportant %}
42-44
: Hyphenate compound adjectives in cloud coverage descriptions
Use hyphens for “low-level,” “medium-level,” and “high-level” to conform with English grammar rules.-| Low cloud coverage | % | Mean value of low level cloud cover. +| Low cloud coverage | % | Mean value of low-level cloud cover. -| Medium cloud coverage | % | Mean value of medium level cloud cover. +| Medium cloud coverage | % | Mean value of medium-level cloud cover. -| High cloud coverage | % | Mean value of high level cloud cover. +| High cloud coverage | % | Mean value of high-level cloud cover.🧰 Tools
🪛 LanguageTool
[uncategorized] ~42-~42: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ... | % | Mean value of low level cloud cover. ...(EN_COMPOUND_ADJECTIVE_INTERNAL)
[uncategorized] ~44-~44: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ... | % | Mean value of high level cloud cover. ...(EN_COMPOUND_ADJECTIVE_INTERNAL)
📜 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/smhi.markdown
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/smhi.markdown
[uncategorized] ~42-~42: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ... | % | Mean value of low level cloud cover. ...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[uncategorized] ~44-~44: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ... | % | Mean value of high level cloud cover. ...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
⏰ 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 (9)
source/_integrations/smhi.markdown (9)
6-6
: Addition of "Sensor" category looks consistent
Including- Sensor
underha_category
aligns with Home Assistant’s categorization for this integration.
14-14
: Platform "sensor" declared correctly
Adding- sensor
toha_platforms
matches the new sensor entities introduced below.
20-20
: Integration introduction follows style guide
The bolded integration name with{% term integration %}
is clear and consistent with other docs.
30-32
: Weather section formatting is correct
The new “## Weather” heading and its description are clear and concise, matching Home Assistant’s documentation style.
34-36
: Sensors section structure is on point
Introducing a separate “## Sensors” section to enumerate metrics is a great organizational improvement.
38-40
: Sensor table header and first entry look good
The table header and “Thunder probability” row follow expected formatting and description conventions.
48-48
: Default disable notice is clear
The note that cloud sensors are not enabled by default is informative and placed appropriately.
52-52
: API documentation link updated correctly
The new URL points to the “introduction” page of SMHI’s API—this aligns with the referenced section.
56-56
: Removal section include is correct
Includingintegrations/remove_device_service.md
under “Remove the integration” ensures users see the proper cleanup steps.
Proposed change
SSIA
Type of change
current
branch).current
branch).next
branch).next
branch).Additional information
Checklist
current
branch.next
branch.Summary by CodeRabbit