Skip to content

Conversation

ctowns
Copy link
Contributor

@ctowns ctowns commented Aug 14, 2025

The device_added handler was calling device_init in order to account for situations where device_init was not called due to a race condition with the device cache. Since lifecycle events are now guaranteed and ordered with FW 58, we no longer need to depend on this extra init.

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
  • Bug fix
  • New feature
  • Refactor

Checklist

  • I have performed a self-review of my code
  • I have commented my code in hard-to-understand areas
  • I have verified my changes by testing with a device or have communicated a plan for testing
  • 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

Summary of Completed Tests

The device_added handler was calling device_init in order to
account for situations where device_init was not called due
to a race condition with the device cache. Since lifecycle events
are now guaranteed and ordered with FW 58, we no longer need
to depend on this extra init.
@ctowns ctowns mentioned this pull request Aug 14, 2025
Copy link

Test Results

   68 files    447 suites   0s ⏱️
2 325 tests 2 325 ✅ 0 💤 0 ❌
3 924 runs  3 924 ✅ 0 💤 0 ❌

Results for commit 655ed87.

Copy link

File Coverage
All files 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/embedded-cluster-utils.lua 38%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/third-reality-mk1/init.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/aqara-cube/init.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/init.lua 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/eve-energy/init.lua 92%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 655ed87

Copy link

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.

4 participants