Repository navigation
[WWSTCERT-14007] Add SONOFF TP-WGZBA Zigbee thermostat support - #3241
Conversation
|
Profile category check: ✅ Passed - all profiles have a category defined. |
|
Duplicate profile check: Passed - no duplicate profiles detected. |
|
Channel deleted. |
|
zigbee-thermostat_coverage.xml
Minimum allowed coverage is Generated by 🐒 cobertura-action against b5f63bb |
Test Results 73 files 543 suites 0s ⏱️ Results for commit b5f63bb. ♻️ This comment has been updated with latest results. |
cjswedes
left a comment
There was a problem hiding this comment.
Along with @KKlimczukS feedback about the custom capabilitites being shifted to preferences, the entire tp_wgzba subdriver is not necessary; it can all live under the sonoff subdriver since there is only one model using this functionality at the moment.
There also seems to be a huge amount of helper code to support these manufacturer specific clusters; we have set up the libraries to do a lot of this for you, and you should try to use that functionality.
cjswedes
left a comment
There was a problem hiding this comment.
I think all but the preference handling can likely be handled by the base driver and default handler implementations.
- Encode boolean preferences backed by Uint8 attributes as 0/1 so the Bluetooth pairing broadcast write is actually sent. - Build the temporary-mode payload with string.pack; keep the frame without a manufacturer code, as required by the device firmware. - Rely on base driver and default handlers for temperature, heating setpoint, thermostat mode, running state, driverSwitched and firmware version. - Emit supported thermostat modes in doConfigure. - Shorten preference names to the platform's 24-character limit.
Keep the SONOFF TRV-ZBT sub-driver from main and move TP-WGZBA into sonoff.tp_wgzba so both devices can match.
cjswedes
left a comment
There was a problem hiding this comment.
I think the base sonoff driver can handle the preferences defined here as well with a little refactoring, but that is out of the scope of this PR I think . Nice work.
Check all that apply
Type of Change
Checklist
Description of Change
Add SONOFF TP-WGZBA support to the zigbee-thermostat driver.
zigbee-thermostat(newsonoff/sonoff.tp_wgzbasub-drivers)Implementation
SONOFF/TP-WGZBA→ profilethermostat-sonoff0xFC11(mfg0x1286) for child lock, open-window, temporary/override mode, radar, screen, relay polarity, NTC, and overheat protectionsonoff/tp_wgzba/init.luabehaviorSummary of Completed Tests
test_sonoff_tp_wgzba_thermostat.lua: 25/25 passed (local Lua 5.3 + capability definitions)init/added/driverSwitched/doConfigure), refresh, standard thermostat reports/commands, private attribute reports/writes, temporary mode commands, threshold/time-period/relay capability writes