[WWSTCERT-13550] Sonoff - Add the pressure display function to SNZB-02M - #3194
[WWSTCERT-13550] Sonoff - Add the pressure display function to SNZB-02M#3194laity-w-sudo wants to merge 8 commits into
Conversation
|
Duplicate profile check: Passed - no duplicate profiles detected. |
|
Profile category check: ✅ Passed - all profiles have a category defined. |
|
Invitation URL: |
Test Results 73 files ±0 542 suites +1 0s ⏱️ ±0s For more details on these failures and errors, see this check. Results for commit 494c68c. ± Comparison against base commit f46b647. ♻️ This comment has been updated with latest results. |
|
zigbee-humidity-sensor_coverage.xml
Minimum allowed coverage is Generated by 🐒 cobertura-action against 494c68c |
The SNZB-02M sub-driver was added but never registered, so the pressure display feature was dead code on the device. Register it via sub_drivers.lua, drop the unrelated SNZB-02LD/WD handler and utils (not in this driver, and referencing a nonexistent sub-driver), and add unit tests for pressure conversion and refresh. Co-Authored-By: Claude <noreply@anthropic.com>
ae161d5 to
b5e3665
Compare
| @@ -0,0 +1,12 @@ | |||
| -- Copyright 2025 SmartThings, Inc. | |||
There was a problem hiding this comment.
| -- Copyright 2025 SmartThings, Inc. | |
| -- Copyright 2026 SmartThings, Inc. |
| --[[ | ||
| Description: SNZB-02M pressure/humidity/temperature sensor driver | ||
| Version: 1.0 | ||
| Author: GitHub Copilot | ||
| --]] |
There was a problem hiding this comment.
| --[[ | |
| Description: SNZB-02M pressure/humidity/temperature sensor driver | |
| Version: 1.0 | |
| Author: GitHub Copilot | |
| --]] | |
| -- Copyright 2026 SmartThings, Inc. | |
| -- Licensed under the Apache License, Version 2.0 |
| if raw_value > 2000 then | ||
| return raw_value / 1000.0 | ||
| end |
There was a problem hiding this comment.
Please, could You add short explanation (in a comment) above this "if" statement regarding the edge case that forces this division ?
There was a problem hiding this comment.
@laity-w-sudo How come this change was removed ? Did You change anything on device's firmware ?
| if CHANGED_DRIVERS: | ||
| DRIVERS = [driver for driver in DRIVERS if driver.name in CHANGED_DRIVERS] |
There was a problem hiding this comment.
This change is not directly related to Your device.
There was a problem hiding this comment.
Remove the changes to this file.
| - id: refresh | ||
| version: 1 | ||
| categories: | ||
| - name: MultiFunctionalSensor |
There was a problem hiding this comment.
| - name: MultiFunctionalSensor | |
| - name: HumiditySensor |
There was a problem hiding this comment.
@laity-w-sudo this requested change is mandatory
| @@ -0,0 +1,117 @@ | |||
| -- Copyright 2025 SmartThings, Inc. | |||
There was a problem hiding this comment.
| -- Copyright 2025 SmartThings, Inc. | |
| -- Copyright 2026 SmartThings, Inc. |
| lazy_load_if_possible("centralite-sensor"), | ||
| lazy_load_if_possible("heiman-sensor"), | ||
| lazy_load_if_possible("frient-sensor"), | ||
| lazy_load_if_possible("sonoff.SNZB-02M"), |
There was a problem hiding this comment.
Please remove the comma at the end of line
There was a problem hiding this comment.
Please remove the comma at the end of line
Hi, the modifications have been made according to your suggestions. However, due to the changes, the automated production line test has failed at present. How can we solve this problem? Also, the error message seems to have nothing to do with the driver I submitted.
Check all that apply
Type of Change
Checklist
Description of Change
Adding the air pressure function to the SNZB-02M equipment
Summary of Completed Tests