Skip to content

Conversation

marcintyminski
Copy link
Contributor

Check all that apply

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

Copy link

Duplicate profile check: Passed - no duplicate profiles detected.

Copy link

Copy link

Test Results

   71 files    453 suites   0s ⏱️
2 365 tests 2 363 ✅ 0 💤 2 ❌
3 987 runs  3 985 ✅ 0 💤 2 ❌

For more details on these failures, see this check.

Results for commit 9675ff5.

Copy link

File Coverage
All files 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-siren/src/init.lua 93%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-siren/src/frient/init.lua 90%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 9675ff5

@@ -1,4 +1,4 @@
-- Copyright 2022 SmartThings
-- Copyright 2025 SmartThings
Copy link
Contributor

Choose a reason for hiding this comment

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

please leave the copyright date as-is

Comment on lines +294 to +304
if compObj then
if component == "SirenVolume" then
device:set_field("sirenVolume", mode_set, {persist = true})
elseif component == "SirenVoice" then
device:set_field("sirenVoice", mode_set, {persist = true})
elseif component == "SquawkVolume" then
device:set_field("squawkVolume", mode_set, {persist = true})
elseif component == "SquawkVoice" then
device:set_field("squawkVoice", mode_set, {persist = true})
end
end
Copy link
Contributor

Choose a reason for hiding this comment

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

you should be able to use device:get_latest_state rather than setting these redundant fields

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd recommend a test of the lifecycle events where PRIMARY_SW_VERSION isn't already set to mirror what the flow would look like for a new device join.

Copy link
Contributor

@greens greens left a comment

Choose a reason for hiding this comment

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

When the profile of a fingerprint is changed, already-installed devices do not switch the profile they're using.

I'm worried that these changes will break functionality for those already installed devices (which will lack the new components). I expect this is the case, and why the test_frient_siren test had to be updated.

I might suggest that you keep the fingerprint and original handler the same, other than adding a read of the fw version, then add a sub-driver that checks that value or the new model names.

Comment on lines +47 to +49
metadata:
mnmn: SmartThingsCommunity
vid: 6f595ea0-8f76-3a67-9e4f-e51ffdad970f
Copy link
Contributor

Choose a reason for hiding this comment

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

We discourage custom metadata for WWST profiles. Can you elaborate on what is being included here?

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