Skip to content

Matter Switch: add default fingerprint tables to profiling logic - #3316

Merged
hcarter-775 merged 1 commit into
mainfrom
deprecated-color-temp-profile-overrides
Nov 3, 2026
Merged

hcarter-775 merged 1 commit into
mainfrom
deprecated-color-temp-profile-overrides

Conversation

@hcarter-775

Copy link
Copy Markdown
Contributor

Description of Change

The Matter Switch driver currently skips dynamic profiling for every device that is assigned the generic light-color-level or light-level-colorTemperature profile. The skip exists to protect devices certified on profiles with embedded Kelvin ranges, which would lose those ranges if re-profiled. As written it is far too broad. It also blocks new and unlisted color lights from being profiled correctly.

Summary of Completed Tests

Unit tests updated, and a new unit test has been added to show the deprecated profile table override in action. Tested on-device to show backwards compatibility (device that does not use the override table).

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Channel deleted.

@github-actions

Copy link
Copy Markdown

matter-switch_coverage.xml

File Coverage
All files 93% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/eve_energy/init.lua 91% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/utils.lua 99% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/device_configuration.lua 97% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/third_reality_mk1/init.lua 93% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/utils.lua 92% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/device_configuration.lua 97% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/init.lua 97% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/init.lua 97% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_handlers/capability_handlers.lua 83% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_handlers/attribute_handlers.lua 95% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/attribute_handlers.lua 81% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/event_handlers.lua 97% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/capability_handlers.lua 92% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_handlers/event_handlers.lua 75% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_utils/event_utils.lua 52% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/hager/init.lua 95% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/aqara_cube/init.lua 95% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/third_reality_garage_door/init.lua 97% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/init.lua 90% ✅

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against a5831fc

@github-actions

Copy link
Copy Markdown

Test Results

   73 files    546 suites   0s ⏱️
3 321 tests 3 321 ✅ 0 💤 0 ❌
5 321 runs  5 321 ✅ 0 💤 0 ❌

Results for commit a5831fc.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you manually check the AI on all these values? It probably did it with scripts, to ensure correctness programanatically, but the biggest risk with this change IMO is somethi8ng missing or something extra included in these maps.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, actually- I did all of them manually months ago, but then never followed up with the PR. Then I had AI double check my own work rather than the other way around. Agreed on your assessment

vendorId: 0x100b
productId: 0x2168
deviceProfileName: light-color-level-2200K-6500K
deviceProfileName: light-color-level

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these profiles changing? Is this what they should have been to enable dynamic profile switching?

@hcarter-775 hcarter-775 Nov 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They actually aren't changing- the default color temp range on the "default" profile is 2200-6500K, exactly the same as this. This profile is identical to the default. So now these devices wouldn't even need to "re-profile" dynamically, since the profile is literally identical. This is mostly a cleanup effort, to clarify what is expected, but it does also drop one extra step, since the device wouldn't actually switch profiles if it starts on the "correct" one.

@hcarter-775
hcarter-775 merged commit dab3698 into main Nov 3, 2026
28 of 29 checks passed
@hcarter-775
hcarter-775 deleted the deprecated-color-temp-profile-overrides branch November 3, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants