-
Notifications
You must be signed in to change notification settings - Fork 510
Add support to smart sirens #2431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add support to smart sirens #2431
Conversation
Duplicate profile check: Passed - no duplicate profiles detected. |
Invitation URL: |
Test Results 71 files 453 suites 0s ⏱️ For more details on these failures, see this check. Results for commit 9675ff5. |
Minimum allowed coverage is Generated by 🐒 cobertura-action against 9675ff5 |
@@ -1,4 +1,4 @@ | |||
-- Copyright 2022 SmartThings | |||
-- Copyright 2025 SmartThings |
There was a problem hiding this comment.
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
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
metadata: | ||
mnmn: SmartThingsCommunity | ||
vid: 6f595ea0-8f76-3a67-9e4f-e51ffdad970f |
There was a problem hiding this comment.
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?
Check all that apply
Type of Change
Checklist
Description of Change
Summary of Completed Tests