Skip to content

feat: resolve the Lock Ultra and Permanent Outdoor Lights OpenAPI device types - #359

Merged
donavanbecker merged 1 commit into
latestfrom
feat/openapi-lock-ultra-outdoor-lights
Nov 1, 2026
Merged

donavanbecker merged 1 commit into
latestfrom
feat/openapi-lock-ultra-outdoor-lights

Conversation

@donavanbecker

Copy link
Copy Markdown
Contributor

What

Two deviceType strings documented in SwitchBotAPI didn't resolve to a device class. They are now mapped in DEVICE_CLASS_MAP:

deviceType Class Source
Lock Ultra WoSmartLockPro devices/locks-security/lock-ultra.md: the status response reports Lock Ultra, but the device list reports Smart Lock Ultra, which is already mapped.
Permanent Outdoor Lights WoRGBICWWStripLight devices/lighting/permanent-outdoor-lights.md: the same commands as the RGBICWW Strip Light (turnOn/turnOff/toggle, setBrightness, setColor "r:g:b", setColorTemperature 2700–6500).

Tests

  • test/types/device-type-resolution.test.ts: both names resolve.
  • test/devices/openapi-commands.test.ts: Permanent Outdoor Lights sends the documented light commands, and Lock Ultra sends lock and unlock.

Build, test (466 passed) and lint pass.

Not covered

These OpenAPI types still have no class and need more than an alias:

  • RGBICWW Ceiling Light: separate main and colour lights (turnOnMainLight, setColorLightRGB...).
  • WeatherStation: temperature, humidity and battery, plus display-text commands. It has no BLE model in pySwitchbot, and mapping it to a meter class would make it wait for BLE advertisements.
  • Cameras, Video Doorbell, AI MindClip, Kata Friends: no device control commands.

No breaking changes. Afterwards, homebridge-switchbot can add Permanent Outdoor Lights to its device types once this is published.


Generated by Claude Code

…ice types

SwitchBotAPI documents two deviceType strings that did not resolve to a class:

- "Lock Ultra": the deviceType the Lock Ultra status response reports (the
  device list says "Smart Lock Ultra", already mapped). Maps to WoSmartLockPro.
- "Permanent Outdoor Lights": same commands as the RGBICWW Strip Light
  (turnOn/turnOff/toggle, setBrightness, setColor, setColorTemperature).
  Maps to WoRGBICWWStripLight.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LzktUt9rqfrSfRydbWruTR
@donavanbecker
donavanbecker merged commit f0e2790 into latest Nov 1, 2026
2 checks passed
@donavanbecker
donavanbecker deleted the feat/openapi-lock-ultra-outdoor-lights branch November 1, 2026 15:21
donavanbecker added a commit to OpenWonderLabs/homebridge-switchbot that referenced this pull request Nov 6, 2026
## What

- `node-switchbot`: `^6.0.2` → `^6.0.4`. 6.0.4 is already on npm.
- 6.0.3
([node-switchbot#358](OpenWonderLabs/node-switchbot#358))
raises undici to 8.12.3 for its security fixes.
- 6.0.4
([node-switchbot#359](OpenWonderLabs/node-switchbot#359))
resolves the OpenAPI deviceTypes `Permanent Outdoor Lights` and `Lock
Ultra`.
- **Permanent Outdoor Lights** is a new device type:
- added to `DEVICE_TYPES` (Lighting) and to
`DEVICE_TYPE_NORMALIZATION_MAP`;
- created as a `LightStripDevice`, like the RGBICWW Strip Light it
shares commands with;
  - normalized to `lightstrip` for Matter.
- `config.schema.json` regenerated by the build.
- `Lock Ultra` needs no plugin change: the device list reports it as
`Smart Lock Ultra`, which is already supported.

## Tests

`test/device/model-identities.spec.ts` checks that the type normalizes
and that `createDevice` returns a `LightStripDevice`. Build, test (220
passed, 1 skipped) and lint pass.

The lockfile was regenerated with npm 11. Only the `node-switchbot` and
`undici` entries change.

## Target branch

No `beta-*` branch exists, and this session isn't allowed to create one,
so this targets `latest` as the guide's fallback says.

No config migration needed.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01LzktUt9rqfrSfRydbWruTR)_

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