-
Notifications
You must be signed in to change notification settings - Fork 4
Supporting new lock integrations
Raman Gupta edited this page Feb 2, 2024
·
4 revisions
The integration is designed to easily support any integration that supports locks, but support needs to be explicitly added. To add support for a new integration:
- Create a new module here with the module name being the domain of the integration.
- Subclass
BaseLock
from here and define your own class. Use thezwave_js
provider as an example, but you basically have to implement all of the functions in theBaseLock
that your lock supports using integration specific code. - Add a mapping of the domain name to your integration provider's lock class here
- Update the README to mention support for the new integration
- Add the integration to the
after_dependencies
list inmanifest.json
- Submit a PR with all of these changes
If these steps are taken, Lock Code Manager will allow users to include locks from the newly added integration.
If you'd like to create tests (recommended but not required):
- Create an integration specific folder here
- Any fixtures should be in that folder, e.g. https://github.com/raman325/lock_code_manager/tree/main/tests/zwave_js/fixtures
- Use the zwave_js tests to figure out how to add your tests.