Repository navigation
feat: support new OpenAPI device types from SwitchBotAPI (November 2026) - #368
Merged
Merged
Conversation
SwitchBotAPI added these device pages (OpenWonderLabs/SwitchBotAPI#520, #526): - Curtain 4 (deviceType "Curtain4"): resolves to WoCurtain; its setPosition "index,mode,position", turnOn/turnOff and pause match the Curtain. - Robot Vacuum Cleaner S30: resolves to WoVacuumS20 (same startClean shape with waterLevel). - Robot Vacuum Cleaner K11 Plus Pro: resolves to WoVacuumK11Plus (same startClean shape). - AI Art Frame: new nextImage()/prevImage() send the OpenAPI next and previous commands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LzktUspaxcZ9Dh5WVEtf5W
# Conflicts: # test/devices/openapi-commands.test.ts
donavanbecker
added a commit
to OpenWonderLabs/homebridge-switchbot
that referenced
this pull request
Nov 20, 2026
…1468) ## What changed node-switchbot 6.1.4 (OpenWonderLabs/node-switchbot#368) resolves new SwitchBotAPI device types. This makes them selectable in the plugin and gives each an accessory: | Device type | Accessory | Why | | --- | --- | --- | | `Curtain4` (also `Curtain 4`) | `Curtain3Device` (Window Covering) | Same OpenAPI commands as the Curtain 3; Matter treats it as a curtain | | `Robot Vacuum Cleaner S30` | `VacuumDevice` | Same as the S20 | | `Robot Vacuum Cleaner K11 Plus Pro` | `WoSweeperDevice` | Same as the K11+ | `config.schema.json` is regenerated from `DEVICE_TYPES`. Tests in `test/device/model-identities.spec.ts` check that each type normalizes and creates the right accessory, and the existing check that normalized types never fall back to `GenericDevice` covers them too. Not added: Art Frame 2 / AI Art Frame 2 and E Ink Photo Magnet (node-switchbot#366). HomeKit and Matter have no picture-frame accessory, and the generic fallback would show them as a Switch that does nothing useful. The existing `AI Art Frame` type has the same issue. No config migration needed. The node-switchbot range (`^6.1.2`) already allows 6.1.4; the lockfile bump comes from the `deps/node-switchbot` PR. ## Checks `npm run build`, `npm run test` (248 passed, 1 skipped) and `npm run lint` pass locally. --- _Generated by [Claude Code](https://claude.ai/code)_ Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
SwitchBotAPI added device pages in OpenWonderLabs/SwitchBotAPI#520 and #526. This covers the ones that map onto existing classes:
Curtain4(andCurtain 4)WoCurtainsetPositionindex,mode,position,turnOn/turnOff,pauseRobot Vacuum Cleaner S30WoVacuumS20startCleanwithwaterLevel,dockRobot Vacuum Cleaner K11 Plus ProWoVacuumK11PlusstartCleanshape,dockWoArtFrame(AI Art Frame) gainsnextImage()/prevImage(), sending the new OpenAPInext/previouscommands (ai-art-frame.md).AI Art Frame 2is handled in #366, which addsWoArtFrame2.Each is pinned in
test/devices/openapi-commands.test.ts.Not mapped:
Vision Doorbell,Outdoor Pan/Tilt Cam 3KandSolar Pan/Tilt Cam 2K(cameras: status only, or motion-detection toggles that no node-switchbot class models yet).Breaking changes
None.
For homebridge-switchbot
Add
Curtain4,Robot Vacuum Cleaner S30andRobot Vacuum Cleaner K11 Plus ProtoDEVICE_TYPES/ normalization once this is published.Checks
npm run build,npm testandnpm run lintpass locally.Generated by Claude Code