Skip to content

feat: support new OpenAPI device types from SwitchBotAPI (November 2026) - #368

Merged
donavanbecker merged 2 commits into
latestfrom
feat/openapi-2026-11
Nov 20, 2026
Merged

donavanbecker merged 2 commits into
latestfrom
feat/openapi-2026-11

Conversation

@donavanbecker

Copy link
Copy Markdown
Contributor

What changed

SwitchBotAPI added device pages in OpenWonderLabs/SwitchBotAPI#520 and #526. This covers the ones that map onto existing classes:

OpenAPI deviceType Resolves to Why
Curtain4 (and Curtain 4) WoCurtain curtain-4.md: same setPosition index,mode,position, turnOn/turnOff, pause
Robot Vacuum Cleaner S30 WoVacuumS20 floor-cleaning-robot-s30.md: same startClean with waterLevel, dock
Robot Vacuum Cleaner K11 Plus Pro WoVacuumK11Plus robot-vacuum-k11-pro.md: same startClean shape, dock

WoArtFrame (AI Art Frame) gains nextImage() / prevImage(), sending the new OpenAPI next / previous commands (ai-art-frame.md). AI Art Frame 2 is handled in #366, which adds WoArtFrame2.

Each is pinned in test/devices/openapi-commands.test.ts.

Not mapped: Vision Doorbell, Outdoor Pan/Tilt Cam 3K and Solar 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 S30 and Robot Vacuum Cleaner K11 Plus Pro to DEVICE_TYPES / normalization once this is published.

Checks

npm run build, npm test and npm run lint pass locally.


Generated by Claude Code

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
donavanbecker merged commit 97afccd into latest Nov 20, 2026
3 checks passed
@donavanbecker
donavanbecker deleted the feat/openapi-2026-11 branch November 20, 2026 18:57
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants