Add support for SwitchBot Lock Ultra via Hub Mini on beta-4.3.2#1273
Closed
Copilot wants to merge 5 commits intobeta-4.3.2from
Closed
Add support for SwitchBot Lock Ultra via Hub Mini on beta-4.3.2#1273Copilot wants to merge 5 commits intobeta-4.3.2from
Copilot wants to merge 5 commits intobeta-4.3.2from
Conversation
…t development (#1262) This PR creates comprehensive GitHub Copilot instructions to help developers work effectively with the homebridge-switchbot codebase. The instructions provide detailed guidance on building, testing, and developing this TypeScript Homebridge platform plugin for SwitchBot smart home devices. ## Key Features Added **Complete Development Workflow Documentation:** - Bootstrap and build process with exact commands and timing expectations - Dependency installation with required `--legacy-peer-deps` flag due to TypeDoc conflicts - TypeScript compilation and plugin UI building (~7 seconds) - Test execution with Vitest (~2 seconds) - Documentation generation with TypeDoc (~7 seconds) **Validation Scenarios:** - Manual plugin validation to ensure proper Homebridge registration - Plugin loading verification with Node.js - TypeScript compilation validation - Documentation generation without warnings - Complete workflow timing (~16 seconds total) **Codebase Navigation Guide:** - Detailed project structure with 38 TypeScript files across device and IR device modules - Key development areas for common tasks (adding devices, configuration changes) - File relationships and dependencies - Base classes and extension patterns for device implementations **Known Issues and Workarounds:** - Documented dependency conflicts requiring `--legacy-peer-deps` - ESLint configuration issues with import/extensions rule - Build artifact management with updated .gitignore **Timing and Performance Guidelines:** - All commands tested with realistic timing expectations - "NEVER CANCEL" warnings for builds with appropriate timeout recommendations - Complete validation workflow benchmarked at under 20 seconds ## Validation All commands and scenarios in the instructions have been thoroughly tested and validated to ensure they work correctly in a fresh development environment. The instructions follow the imperative tone requirement and provide exhaustive coverage of the development workflow. The file is located at `.github/copilot-instructions.md` and provides over 7,000 characters of comprehensive guidance for GitHub Copilot to work effectively with this codebase. Fixes #1261. <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: donavanbecker <9875439+donavanbecker@users.noreply.github.com>
Co-authored-by: donavanbecker <9875439+donavanbecker@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Feature Request: Support Lock Ultra via Hub Mini (not Matter)
Add support for SwitchBot Lock Ultra via Hub Mini
Aug 28, 2025
donavanbecker
approved these changes
Aug 28, 2025
Collaborator
|
@copilot rework this or by rebasing to beta-* branch |
Contributor
Author
I've rebased the Lock Ultra support onto the beta-4.3.2 branch as requested. The implementation is now on the new branch |
Copilot
AI
changed the title
Add support for SwitchBot Lock Ultra via Hub Mini
Add support for SwitchBot Lock Ultra via Hub Mini on beta-4.3.2
Aug 28, 2025
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.
This PR adds support for SwitchBot Lock Ultra devices to work via Hub Mini through the OpenAPI connection, addressing the feature request to enable Lock Ultra functionality with existing Hub Mini infrastructure.
Note: This implementation has been rebased onto the
beta-4.3.2branch as requested for proper integration with the latest development version.Changes Made
The implementation reuses the existing Lock class infrastructure with minimal changes:
'Smart Lock Ultra'to the device type handlers inplatform.tsSwitchBotModel.LockPromodel as Lock Pro for full feature compatibilitysettings.tsto include Lock Ultra as a validlockConfigdevice typeconfig.schema.jsonwith all lock-specific options (contact sensor hiding, latch button activation, connection types, etc.)Technical Details
Lock Ultra leverages the existing Lock class implementation, treating it functionally equivalent to Lock Pro. This approach ensures:
Testing
The implementation follows the existing pattern used for Lock Pro and maintains backward compatibility while extending support to the newer Lock Ultra hardware.
Fixes #1271.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.