Zigbee Switch: Fix Climax power meter scaling - #3205
Open
sungmpar wants to merge 2 commits into
Open
Conversation
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.
Check all that apply
Type of Change
Checklist
Description of Change
Summary
ActivePowerto the SDK-standard handler.InstantaneousDemandto the SDK-standard handler.Root cause
The shared
zigbee-switch-powercompatibility handlers divide reported values by the configured divisor but do not apply the corresponding multiplier. The sharedInstantaneousDemandpath also emits a kW-scaled value as watts without multiplying by 1000.Changing these shared handlers globally could alter established compatibility behavior for other fingerprinted devices.
Implementation
The nested subdriver matches only manufacturer
ClimaxTechnologyand modelPSM_00.00.00.35TC. It overrides only Electrical MeasurementActivePowerand Simple MeteringInstantaneousDemand, delegating both attributes to the existing SDK-standard handlers.The shared compatibility handlers and all non-Climax device behavior remain unchanged.
Hardware validation
No SmartThings hub or physical Climax device was used. Automated integration tests verify driver and subdriver routing, multiplier/divisor field use, numerical scaling, kW-to-W conversion, and emitted
powerMeterevents.The physical-device test plan is to pair a
PSM_00.00.00.35TCwith a SmartThings hub and verify report ordering, endpoint behavior, and emitted watt values against a known load when hardware is available. That hardware validation was not performed for this change, so firmware report ordering, endpoint quirks, and deployed-device behavior remain unverified.Fixes #236
Summary of Completed Tests
test_switch_power: 7/7 passedtest_aurora_relay: 4/4 passedtest_ledvance_metering_plug: 4/4 passed