feat(schneider): Add custom converter for NHPB/DIMMER/1 strict ZCL compliance#11340
Merged
Koenkk merged 2 commits intoKoenkk:masterfrom Jan 21, 2026
Merged
Conversation
Contributor
Author
|
Fixes: Koenkk/zigbee2mqtt#30701 |
Koenkk
reviewed
Jan 20, 2026
| * that are not explicitly supported, even with value 0. | ||
| * This converter sends only the mandatory level and transtime parameters. | ||
| */ | ||
| schneider_strict_level_control: { |
Owner
There was a problem hiding this comment.
To prevent code duplication, please use a meta option for this, example:
ca26588 to
ee9ffab
Compare
…mpliance Schneider Electric NHPB/DIMMER/1 (WDE002386) implements strict ZCL v1 without optional optionsMask/optionsOverride parameters. Add custom converter schneider_strict_level_control that sends only mandatory parameters (level, transtime) to ensure device compatibility. Requires zigbee-herdsman PR for MINIMUM_REMAINING_BUFFER_BYTES support.
Use meta.omitOptionalLevelParams option in light_onoff_brightness converter instead of creating a separate custom converter. This follows the established pattern for device-specific behavior (like turnsOffAtBrightness1). Changes: - Add omitOptionalLevelParams support to tz.light_onoff_brightness - Add omitOptionalLevelParams to DefinitionMeta type - Set meta.omitOptionalLevelParams: true for NHPB/DIMMER/1 Addresses review comment from @Koenkk
ee9ffab to
b0adc76
Compare
Contributor
Author
|
@Koenkk Thanks for the review! I've refactored the implementation to use a meta option as suggested:
Much cleaner approach! Tested successfully with WDE002386 - all brightness commands work correctly. Ready for re-review when you have time. |
Owner
|
Thanks! |
Koenkk
pushed a commit
that referenced
this pull request
Feb 3, 2026
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.
Schneider Electric NHPB/DIMMER/1 (WDE002386) implements strict ZCL v1 without optional optionsMask/optionsOverride parameters. Add custom converter schneider_strict_level_control that sends only mandatory parameters (level, transtime) to ensure device compatibility.
Requires zigbee-herdsman PR for MINIMUM_REMAINING_BUFFER_BYTES support.
Update Jan 21st 2026
Following review feedback from @Koenkk, this PR implements a meta option approach to avoid code duplication:
Changes
omitOptionalLevelParams?: booleantoDefinitionMetainsrc/lib/types.tslight_onoff_brightnessconverter insrc/converters/toZigbee.tsto conditionally omitoptionsMaskandoptionsOverrideparametersmeta: {omitOptionalLevelParams: true}to the Schneider Electric NHPB/DIMMER/1 device definitionImplementation
Follows the same pattern as
turnsOffAtBrightness1, making it reusable for any device with strict ZCL v1 compliance requirements.Testing
Tested successfully with Schneider Electric WDE002386 (NHPB/DIMMER/1) - all brightness commands work correctly with both dimmers.