[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 5 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 1 files 12 suites 0s ⏱️ Results for commit 1ca26b1. ♻️ This comment has been updated with latest results. |
|
zigbee-humidity-sensor_coverage.xml
Minimum allowed coverage is Generated by 🐒 cobertura-action against 1ca26b1 |
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 ?
| 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 |
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