Matter Switch: Support fan/light devices
Type of Change
- [ ] WWST Certification Request
- If this is your first time contributing code:
- [ ] I have reviewed the README.md file
- [ ] I have reviewed the CODE_OF_CONDUCT.md file
- [ ] I have signed the CLA
- [ ] I plan on entering a WWST Certification Request or have entered a request through the WWST Certification console at developer.smartthings.com
- If this is your first time contributing code:
- [ ] Bug fix
- [x] New feature
- [ ] Refactor
Checklist
- [x] I have performed a self-review of my code
- [x] I have commented my code in hard-to-understand areas
- [x] I have verified my changes by testing with a device or have communicated a plan for testing
- [x] I am adding new behavior, such as adding a sub-driver, and have added and run new unit tests to cover the new behavior
Description of Change
This change adds support for an extended color light/fan combination device. A new profile for this device type was added by PR 2012. New logic is included in the matter switch driver to support the component mapping for this profile. This change also refactors some of the initialization logic to help support expanding the driver to cover more multi-type devices in the future.
Summary of Completed Tests
Tested with an Orein bathroom fan device. New unit tests also included.
Duplicate profile check: Passed - no duplicate profiles detected.
Channel deleted.
Test Results
65 files 420 suites 0s ⏱️ 2 144 tests 2 144 ✅ 0 💤 0 ❌ 3 664 runs 3 664 ✅ 0 💤 0 ❌
Results for commit a5896f7c.
:recycle: This comment has been updated with latest results.
| File | Coverage | |
|---|---|---|
| All files | 92% |
:white_check_mark: |
| /home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/init.lua | 93% |
:white_check_mark: |
| /home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/aqara-cube/init.lua | 96% |
:white_check_mark: |
| /home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/embedded-cluster-utils.lua | 38% |
:x: |
| /home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/eve-energy/init.lua | 91% |
:white_check_mark: |
Minimum allowed coverage is 90%
Generated by :monkey: cobertura-action against a5896f7c19684bf136ab609dd8404c88b7635fd3
Closing in favor of #2032