Skip to content

Add humidifer and led for switchbot integration #39722

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

Merged
merged 1 commit into from
Jun 26, 2025

Conversation

zerzhang
Copy link
Contributor

@zerzhang zerzhang commented Jun 26, 2025

Proposed change

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 SwitchBot integration documentation to include new supported device types: Strip Light 3, Floor Lamp, and Evaporative Humidifier.
    • Added a new "Humidifier" category and platform, detailing supported features for humidifier devices.
    • Expanded feature lists for Ceiling Light, Strip Light 3, and Floor Lamp.
    • Improved formatting for better readability.

@zerzhang zerzhang requested a review from Danielhiversen as a code owner June 26, 2025 08:52
@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 26, 2025
Copy link

netlify bot commented Jun 26, 2025

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit 4af932a
🔍 Latest deploy log https://app.netlify.com/projects/home-assistant-docs/deploys/685d0a38b660090008b50420
😎 Deploy Preview https://deploy-preview-39722--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 26, 2025

📝 Walkthrough

Walkthrough

The documentation for the SwitchBot integration was updated to include support for new device types and features. Additions include a new "Humidifier" category and platform, expanded lists of supported light and humidifier devices, and detailed feature descriptions for these devices. No code or control flow changes were made.

Changes

File(s) Change Summary
source/_integrations/switchbot.markdown Updated documentation to add "Humidifier" category and platform, new supported light and humidifier devices, and expanded feature lists.

Sequence Diagram(s)

No sequence diagram generated as the changes are documentation-only and do not affect control flow or introduce new features requiring diagrammatic representation.


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

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

4-13: Category list now out-of-order

The template keeps ha_category alphabetically sorted. After inserting “Humidifier”, the order is now
Binary sensor, Cover, Fan, Humidifier, Light, Lock... – but “Fan” should follow “Cover” alphabetically.
Re-sort to keep parity with the rest of the docs.

-  - Binary sensor
-  - Cover
-  - Fan
-  - Humidifier
+  - Binary sensor
+  - Cover
+  - Fan
+  - Humidifier
   - Light
   - Lock
   - Sensor
   - Switch
   - Vacuum

25-35: ha_platforms list also needs alphabetical ordering

For the same reason as above: keep the platform keys in sorted order to avoid future merge conflicts and follow the integration template.

-  - fan
-  - humidifier
-  - light
+  - fan
+  - humidifier
+  - light

(only the insertion point needs to move; other lines unchanged).


118-125: Lights sub-list no longer alphabetical

New items “Strip Light 3” and “Floor Lamp” were appended, breaking the alphabetical sequence (and numeric suffix “3” belongs next to its family). Consider re-ordering:

- - [Light Strip (WoStrip)](...)
- - [Smart Ceiling Light (WoCeiling)](...)
- - [Strip Light 3](...)
- - [Floor Lamp](...)
+ - [Floor Lamp](...)
+ - [Light Strip (WoStrip)](...)
+ - [Smart Ceiling Light (WoCeiling)](...)
+ - [Strip Light 3](...)

133-137: Double-space typo

There is an extra space before “Evaporative”, breaking some parsers and linters.

- Humidifier and  Evaporative Humidifier.
+ Humidifier and Evaporative Humidifier.

429-452: Minor consistency & English fixes in new light device sections

  1. Bullet list for Floor Lamp lacks a blank line above, triggering MD032.
  2. “change color temperature” bullet exists for Strip Light 3 but not for LED Strip Light earlier; ensure parity if technically supported.
-#### Floor Lamp
-
-This is an encrypted device.
-
-Features:
-
-- turn on or off
-- change brightness
-- change color temperature
-- change color
-- set effect
+#### Floor Lamp
+
+This is an encrypted device.
+
+Features:
+
+ - turn on or off
+ - change brightness
+ - change color temperature
+ - change color
+ - set effect

(The added space before the first bullet satisfies MD032.)


577-601: Grammar & clarity improvements for the new Humidifier section

A couple of small issues:

  • “Not all modes support unless …” → “Not all modes are supported unless …”
  • Lists need a blank line before/after per MD032.
-This is an encrypted device.
-Note: Not all modes support unless you bind the temperature and humidity sensor.
+This is an encrypted device.
+Note: Not all modes are supported unless you bind a temperature and humidity sensor.

-Features:
-
-- turn on
-- turn off
-- set mode
-- set humidity
+Features:
+
+ - turn on
+ - turn off
+ - set mode
+ - set humidity
📜 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 b9549bf and 4af932a.

📒 Files selected for processing (1)
  • source/_integrations/switchbot.markdown (15 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`source/_integrations/*`: Integration documentation must use the provided template structure and section order.

source/_integrations/*: Integration documentation must use the provided template structure and section order.

📄 Source: CodeRabbit Inference Engine (.github/copilot-instructions.md)

List of files the instruction was applied to:

  • source/_integrations/switchbot.markdown
🪛 markdownlint-cli2 (0.17.2)
source/_integrations/switchbot.markdown

414-414: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)

🪛 LanguageTool
source/_integrations/switchbot.markdown

[uncategorized] ~593-~593: Possible missing comma found.
Context: ...n encrypted device. Note: Not all modes support unless you bind the temperature and hum...

(AI_HYDRA_LEO_MISSING_COMMA)

⏰ 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

Copy link
Contributor

coderabbitai bot commented Jun 26, 2025

📝 Walkthrough

Walkthrough

The documentation for the SwitchBot integration was updated to include support for new device types and features. Additions include new light and humidifier devices, expanded feature lists, and the introduction of the "Humidifier" platform and category. Formatting improvements were also made for clarity.

Changes

File(s) Summary of Changes
source/_integrations/switchbot.markdown Added "Humidifier" platform and category; listed new devices (Strip Light 3, Floor Lamp, Evaporative Humidifier); expanded feature lists for several device types; improved formatting for feature clarity.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant HomeAssistant
    participant SwitchBotIntegration

    User->>HomeAssistant: Adds/Configures SwitchBot integration
    HomeAssistant->>SwitchBotIntegration: Discovers supported devices
    SwitchBotIntegration-->>HomeAssistant: Reports devices (Lights, Humidifiers, etc.)
    HomeAssistant->>User: Displays new device types (Strip Light 3, Floor Lamp, Evaporative Humidifier)
    User->>HomeAssistant: Controls device (on/off, brightness, mode, humidity, etc.)
    HomeAssistant->>SwitchBotIntegration: Sends control command
    SwitchBotIntegration-->>HomeAssistant: Updates device state
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

🧹 Nitpick comments (7)
source/_integrations/switchbot.markdown (7)

25-35: Keep ha_platforms list alphabetically sorted

The newly-added humidifier entry makes the list slightly out of order (light should come after humidifier). Sorting keeps future merges conflict-free.

-  - fan
-  - humidifier
-  - light
+  - fan
+  - light
+  - humidifier

120-125: Re-order the “Lights” device list alphabetically

Floor Lamp should appear before Light Strip to keep the list consistent.

 - [Color Bulb (WoBulb)](https://switch-bot.com/pages/switchbot-color-bulb)
 - [Light Strip (WoStrip)](https://www.switchbot.jp/products/switchbot-strip-light)
 - [Smart Ceiling Light (WoCeiling)](https://www.switchbot.jp/products/switchbot-ceiling-light)
 - [Strip Light 3](https://www.switch-bot.com/products/switchbot-led-strip-light-3)
 - [Floor Lamp](https://www.switch-bot.com/products/switchbot-floor-lamp)
+- [Floor Lamp](https://www.switch-bot.com/products/switchbot-floor-lamp)
+- [Light Strip (WoStrip)](https://www.switchbot.jp/products/switchbot-strip-light)

133-137: Alphabetise the “Humidifiers” list

Evaporative Humidifier (E) should precede Humidifier (H).

 - [Humidifier (WoHumi)](https://www.switchbot.jp/products/switchbot-smart-humidifier)
 - [Evaporative Humidifier](https://www.switch-bot.com/products/switchbot-evaporative-humidifier-auto-refill)
+ - [Evaporative Humidifier](https://www.switch-bot.com/products/switchbot-evaporative-humidifier-auto-refill)
+ - [Humidifier (WoHumi)](https://www.switchbot.jp/products/switchbot-smart-humidifier)

403-410: Add a trailing blank line after the list to satisfy MD032

Markdown-lint warns when a list isn’t surrounded by blank lines. Insert one empty line after the last bullet.

 - change color temperature
+

429-440: Insert blank line after Strip Light 3 feature list

Same MD032 issue as above; add a blank line after - set effect.


441-452: Insert blank line after Floor Lamp feature list

Add an empty line after - set effect to keep linter happy.


592-594: Fix grammar in the usage note

Current phrase is awkward and flagged by LanguageTool. Suggested wording:

-Note: Not all modes support unless you bind the temperature and humidity sensor.
+Note: Not all modes are supported unless the humidifier is bound to a temperature and humidity sensor.
📜 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 b9549bf and 4af932a.

📒 Files selected for processing (1)
  • source/_integrations/switchbot.markdown (15 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`source/_integrations/*`: Integration documentation must use the provided template structure and section order.

source/_integrations/*: Integration documentation must use the provided template structure and section order.

📄 Source: CodeRabbit Inference Engine (.github/copilot-instructions.md)

List of files the instruction was applied to:

  • source/_integrations/switchbot.markdown
🪛 markdownlint-cli2 (0.17.2)
source/_integrations/switchbot.markdown

414-414: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)

🪛 LanguageTool
source/_integrations/switchbot.markdown

[uncategorized] ~593-~593: Possible missing comma found.
Context: ...n encrypted device. Note: Not all modes support unless you bind the temperature and hum...

(AI_HYDRA_LEO_MISSING_COMMA)

🔇 Additional comments (1)
source/_integrations/switchbot.markdown (1)

4-10: Verify ha_category entry for policy compliance

Humidifier was added to the ha_category list. Please double-check that this value is part of the officially-supported Home Assistant categories, including the exact casing, as the front-matter is validated by the docs build pipeline.

@zerzhang
Copy link
Contributor Author

@c0ffeeca7 As i have changed the current branch for switchbot yestoday, and now i add new feature for next branch, Will this cause conflicts and affect the release of new versions?

@c0ffeeca7 c0ffeeca7 modified the milestone: 2025.7 Jun 26, 2025
Copy link
Contributor

@c0ffeeca7 c0ffeeca7 left a comment

Choose a reason for hiding this comment

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

Thank you, @zerzhang 👍

@c0ffeeca7 c0ffeeca7 added parent-merged The parent PR has been merged already projects and removed projects labels Jun 26, 2025
@c0ffeeca7 c0ffeeca7 merged commit 1a1a65a into home-assistant:next Jun 26, 2025
7 checks passed
@home-assistant home-assistant bot removed the parent-merged The parent PR has been merged already label Jun 26, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jun 27, 2025
@frenck frenck added the cherry-picked This PR has been manually picked and merged into the current branch label Jul 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cherry-picked This PR has been manually picked and merged into the current branch 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.

3 participants