Add option to bypass association validation checks
Description
Adds skipAssociationCheck option to Controller.addAssociations() to bypass security class and CC compatibility validation. Enables associations between devices with mismatched security classes (e.g., S0 keyfob → No Security device).
Changes
-
Controller.addAssociations()- Accept optionalskipAssociationCheckparameter -
ccUtils.addAssociations()- Conditionally skip validation when flag is set - Tests - Verify behavior with and without flag
Usage
// Bypass validation for incompatible security classes
await controller.addAssociations(
{ nodeId: 2 }, // S0 device
2,
[{ nodeId: 3 }], // No Security device
{ skipAssociationCheck: true }
);
Warning: Invalid associations may not work or cause unexpected behavior.
[!WARNING]
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
plugins.dprint.dev
- Triggering command:
/home/REDACTED/work/zwave-js/zwave-js/node_modules/.store/dprint-npm-0.50.2-6fd6d613ee/package/dprint /home/REDACTED/work/zwave-js/zwave-js/node_modules/.store/dprint-npm-0.50.2-6fd6d613ee/package/dprint fmt(dns block)If you need me to access, download, or install something from one of these locations, you can either:
- Configure Actions setup steps to set up my environment, which run before the firewall is enabled
- Add the appropriate URLs or hosts to the custom allowlist in this repository's Copilot coding agent settings (admins only)
Original prompt
This section details on the original issue you should resolve
<issue_title>Add option to create associations without checking if they are allowed</issue_title> <issue_description>Use case see https://github.com/zwave-js/zwave-js-ui/issues/4493</issue_description>
Comments on the Issue (you are @copilot in this section)
- Fixes zwave-js/zwave-js#8489
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
@copilot get rid of the test file. Rename the new option to
force. Don't forget to update the method signature in the documentation at docs/api/controller.md
Done in commit 8999173. Renamed skipAssociationCheck to force, removed the test file, and updated the documentation in docs/api/controller.md.
💡 The pull request title does not match our guidelines 💡
We follow conventional commits, check out the description and examples. This means that the PR title must...
- start with the type of change, e.g.
feat:, orfix: - optionally specify a scope, for example we use
configfor changes to config files:feat(config): - contain a description that explains what is being changed, e.g. add a parameter, correct a typo, ...
- and ideally explains what the change affects, e.g. the device (manufacturer, device label, firmware, ...)
The description should use uppercase and lowercase normally, except for the first character which must be lowercase.
How about this title instead?
feat(controller): add option to force associations without validation