-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Added documentation for smarla integration #38551
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
base: next
Are you sure you want to change the base?
Added documentation for smarla integration #38551
Conversation
It seems that this PR is targeted against an incorrect branch. Documentation updates which apply to our current stable release should target the |
✅ Deploy Preview for home-assistant-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
d604ae3
to
1f2167f
Compare
📝 WalkthroughWalkthroughA new documentation file has been introduced for the "smarla" integration, which enables Home Assistant to control Swing2Sleep Smarla motorized cradles. The document details integration metadata, requirements, registration steps, and descriptions of supported entity platforms such as switch entities. It also provides step-by-step instructions for connecting the device, generating an access token, and configuring the integration within Home Assistant. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant SmarlaDevice
participant Swing2SleepApp
participant HomeAssistant
User->>SmarlaDevice: Connect to Wi-Fi
User->>Swing2SleepApp: Open app and generate access token
Swing2SleepApp-->>User: Display access token
User->>HomeAssistant: Add Smarla integration and enter token
HomeAssistant->>SmarlaDevice: Establish connection via cloud
HomeAssistant->>User: Setup switch entities (oscillation, smartmode)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (3)
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:
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: 0
🧹 Nitpick comments (3)
source/_integrations/smarla.markdown (3)
18-19
: Refine introduction phrasing.
Consider rewording to avoid repeating “integration”:
“Thesmarla
integration enables Home Assistant to control Swing2Sleep motorized cradles.”
20-25
: Unify bullet punctuation in Requirements.
Some list items end with a period, others don’t. For consistency, either add a period to “- Internet connectivity” or remove periods from all bullets.
26-33
: Polish Registration steps formatting.
- Ensure each numbered step ends with a period.
- Change “Connect the device with your Wi‑Fi” to “Connect the device to your Wi‑Fi network.”
- Add a trailing period to step 3 (“…until the access token field appears.”).
These edits will improve consistency and clarity.🧰 Tools
🪛 LanguageTool
[uncategorized] ~31-~31: Possible missing preposition found.
Context: ...until the access token field appears 4. Generate an access token in the Swing2Sleep App ...(AI_HYDRA_LEO_MISSING_TO)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
source/_integrations/smarla.markdown
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/smarla.markdown
[uncategorized] ~31-~31: Possible missing preposition found.
Context: ...until the access token field appears 4. Generate an access token in the Swing2Sleep App ...
(AI_HYDRA_LEO_MISSING_TO)
⏰ 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 (4)
source/_integrations/smarla.markdown (4)
1-16
: Verify front matter metadata and featured flag.
The integration’s YAML header is well‑structured, but please confirm whetherfeatured: true
is appropriate for a new integration (this flag highlights the integration on the docs homepage). If the integration shouldn’t be featured immediately, consider removing or toggling this field. Also verify thatha_domain: smarla
andha_integration_type: device
match the corresponding settings in the core PR (home-assistant/core#143081).
34-34
: Include configuration flow snippet.
The{% include integrations/config_flow.md %}
directive correctly pulls in the standard setup instructions.
36-39
: Entities section header is accurate.
The heading and introductory sentence clearly describe the entities created by this integration.
40-43
: Table formatting looks good.
The table forcradle
andsmartmode
switch entities is properly aligned and descriptive.
3576987
to
91e826b
Compare
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 (3)
source/_integrations/smarla.markdown (3)
18-18
: Avoid repetition in intro sentence.
The phrase “integration to integrate” is redundant. Consider rephrasing to:The
smarla
{% term integration %} allows you to control your Swing2Sleep device.
30-30
: Add missing punctuation for consistency.
Step 3 is missing a period at the end. For consistency with other steps, please add a trailing period:-3. Follow the steps for **Configuration** until the access token field appears +3. Follow the steps for **Configuration** until the access token field appears.
31-31
: Clarify “under settings” phrasing.
The wording “in the Swing2Sleep App under settings” may be unclear. Consider:-4. Generate an access token in the Swing2Sleep App under settings. +4. Generate an access token in the Swing2Sleep App’s Settings menu.🧰 Tools
🪛 LanguageTool
[uncategorized] ~31-~31: Possible missing preposition found.
Context: ...until the access token field appears 4. Generate an access token in the Swing2Sleep App ...(AI_HYDRA_LEO_MISSING_TO)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
source/_integrations/smarla.markdown
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/smarla.markdown
[uncategorized] ~31-~31: Possible missing preposition found.
Context: ...until the access token field appears 4. Generate an access token in the Swing2Sleep App ...
(AI_HYDRA_LEO_MISSING_TO)
🔇 Additional comments (1)
source/_integrations/smarla.markdown (1)
8-8
: Verify release version aligns with core PR.
Theha_release
value'2025.5.0'
should match the version introduced by the corresponding core integration PR (143081). Please confirm this version is correct for the next release.
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 (4)
source/_integrations/smarla.markdown (4)
18-19
: Refine the integration description for clarityThe phrase “is the main integration to integrate” is redundant. Consider a concise rewrite:
-The `smarla` {% term integration %} is the main integration to integrate [Swing2Sleep](https://swing2sleep.de) (Smarla) motorized cradles. +The `smarla` {% term integration %} enables Home Assistant to control [Swing2Sleep Smarla](https://swing2sleep.de) motorized cradles.
22-25
: Standardize requirement versions and phrasingUnify version formatting and simplify wording:
- Swing2Sleep Smarla device with Version 1.6.X or greater. + Swing2Sleep Smarla device with version 1.6.x or later. - Internet connectivity. + Internet access.
28-33
: Improve step descriptions in RegistrationClarify network actions and UI labels for consistency:
- 2. Connect the device with your Wi-Fi. + 2. Connect the device to your Wi-Fi network. - 4. Generate an access token in the Swing2Sleep app under settings. + 4. In the Swing2Sleep app, generate an access token under **Settings**.🧰 Tools
🪛 LanguageTool
[uncategorized] ~31-~31: Possible missing preposition found.
Context: ...until the access token field appears 4. Generate an access token in the Swing2Sleep app ...(AI_HYDRA_LEO_MISSING_TO)
40-43
: Style: use sentence case in entity descriptionsFor consistency with other integration docs, apply sentence casing:
-| `cradle` | `switch` | Turn `On` or `Off` the oscillation of the cradle. | +| `cradle` | `switch` | Turn on or off the cradle’s oscillation. | -| `smartmode` | `switch` | Turn `On` or `Off` automatic control of the intensity. | +| `smartmode` | `switch` | Enable or disable automatic intensity control. |
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
source/_integrations/smarla.markdown
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/smarla.markdown
[uncategorized] ~31-~31: Possible missing preposition found.
Context: ...until the access token field appears 4. Generate an access token in the Swing2Sleep app ...
(AI_HYDRA_LEO_MISSING_TO)
⏰ 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/smarla.markdown (2)
34-34
: Validate include path for configuration flowEnsure the include directive matches the actual file path in the docs:
- Verify that
integrations/config_flow.md
exists atsource/_integrations/
or adjust the path accordingly.
1-16
:❓ Verification inconclusive
Verify frontmatter metadata for compliance with HA schema
The frontmatter keys and values should align with Home Assistant’s documentation standards:
- Confirm
ha_category
uses the exact identifier expected (e.g.,switch
vsSwitch
).- Validate
ha_iot_class
– official docs use snake_case (cloud_push
) rather than title case.- Double‑check that
ha_integration_type: device
is a supported type.Run this snippet to inspect the official schema in the docs repo:
🏁 Script executed:
#!/bin/bash # Locate frontmatter definitions rg -R "ha_category:" -A 3 source/Length of output: 438
To get a broader view of how these keys are used across all integrations, let’s pull the actual values from other frontmatter files:
🏁 Script executed:
#!/bin/bash # List ha_category values in all integration docs rg 'ha_category:' -n source/_integrations # List ha_iot_class values in all integration docs rg 'ha_iot_class:' -n source/_integrations # List ha_integration_type values in all integration docs rg 'ha_integration_type:' -n source/_integrationsLength of output: 68503
Verify frontmatter metadata for compliance with HA schema
I wasn’t able to find examples of
ha_iot_class
orha_integration_type
in other integration docs—please confirm these fields match the official frontmatter spec:
- ha_category
– Should use the exact identifier (e.g.- switch
rather than- Switch
).- ha_iot_class
– Must be snake_case (cloud_push
), not title case.- ha_integration_type
– This key is uncommon in existing docs—double‑check thatdevice
is a supported type.
Proposed change
Type of change
current
branch).current
branch).next
branch).next
branch).Additional information
Checklist
current
branch.next
branch.Summary by CodeRabbit