SmartThingsCommunity / SmartThingsEdgeDrivers

Apache License 2.0
268 stars 452 forks source link

Matter Switch: Use previous cluster feature path name #1720

Closed nickolas-deboom closed 1 week ago

nickolas-deboom commented 1 week ago

Type of Change

Checklist

Description of Change

CHAD-14220

When the button driver was merged into the switch driver, the old paths for cluster type definitions for the Switch cluster were updated to use the new paths defined in the lua libs. For example, clusters.Switch.types.SwitchFeature.MOMENTARY_SWITCH was changed to clusters.Switch.types.Feature.MOMENTARY_SWITCH. However, hubs running firmware 52 or below still use the old path which results in the driver not being able to find the type definition.

Using the new paths for existing cluster definitions is common in other drivers, however in all of these cases, embedded cluster definitions were included so this issue was not noticed before.

Summary of Completed Tests

A Color Temperature Light was tested on lua libs 52 both with and without this change. In the attached hub logs, it can be seen that this issue occurred in without this change in hubcore_20241024_pre_driver_change2.log on line 177. The device does not onboard correctly and says that it hasn't updated all its information yet in the ST app. This does not happen with this change in hubcore_20241024_post_driver_change.log, where the device onboards correctly and is fully functional.

This was also tested with the latest lua libs, which also did not have any issues after this change was applied. See hubcore_20241024_lua_libs_54.log.

hubcore_20241024_pre_driver_change2.log hubcore_20241024_post_driver_change.log hubcore_20241024_lua_libs_54.log

github-actions[bot] commented 1 week ago

Channel deleted.

github-actions[bot] commented 1 week ago

Test Results

   64 files    400 suites   0s ⏱️ 1 989 tests 1 989 ✅ 0 💤 0 ❌ 3 429 runs  3 429 ✅ 0 💤 0 ❌

Results for commit 1f1587f9.

github-actions[bot] commented 1 week ago

File Coverage
All files 94% :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/init.lua 96% :white_check_mark:
/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 1f1587f9036a47ff0261f1e5615436494e4de4c3