Skip to content

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:

  1. Create a new module here with the module name being the domain of the integration.
  2. Subclass BaseLock from here and define your own class. Use the zwave_js provider as an example, but you basically have to implement all of the functions in the BaseLock that your lock supports using integration specific code.
  3. Add a mapping of the domain name to your integration provider's lock class here
  4. Update the README to mention support for the new integration
  5. Add the integration to the after_dependencies list in manifest.json
  6. 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):

  1. Create an integration specific folder here
  2. Any fixtures should be in that folder, e.g. https://github.com/raman325/lock_code_manager/tree/main/tests/zwave_js/fixtures
  3. Use the zwave_js tests to figure out how to add your tests.