Skip to content

Feature: Adds Z-Wave Safety Shutoff class of devices & FireAvert shutoff models - #2908

Draft
bstewart-cae wants to merge 15 commits into
SmartThingsCommunity:mainfrom
bstewart-cae:feature/add-safety-shutoff
Draft

bstewart-cae wants to merge 15 commits into
SmartThingsCommunity:mainfrom
bstewart-cae:feature/add-safety-shutoff

Conversation

@bstewart-cae

@bstewart-cae bstewart-cae commented Apr 17, 2026

Copy link
Copy Markdown

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

This adds a subdriver for Z-Wave Safety Shutoff devices. These devices may have behavior that is similar to a switch or relay but are unable to be turned on or off based on other factors.

Summary of Completed Tests

Functional testing on both the FireAvert Gas and Electric 120V devices.

@CLAassistant

CLAassistant commented Apr 17, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@bstewart-cae bstewart-cae changed the title Feature/add safety shutoff Feature: Adds Z-Wave Safety Shutoff class of devices & FireAvert shutoff models Apr 17, 2026
[capabilities.soundDetection.ID] = capabilities.soundDetection.soundDetected.noSound(),
[capabilities.applianceUtilization.ID] = capabilities.applianceUtilization.status.notInUse(),
[capabilities.switch.ID] = capabilities.switch.switch.off()
}

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.

You may need to add here:
[capabilities.soundDetection.ID] = capabilities.soundDetection.supportedSoundTypes({"noSound", "fireAlarm"}, {visibility = { displayed = false }})

version: 1
config:
values:
- key: supportedSoundTypes.value

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.

Please check with: soundDetected.value

version: 1
config:
values:
- key: supportedSoundTypes.value

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.

Please check with: soundDetected.value

…, various functionality fixes, updated config to use soundDetected

@KKlimczukS KKlimczukS left a comment

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.

Please try with this device profile.
important note: I added another component appliancePower, so events for applianceUtilization capability should reflect that either

Comment on lines +1 to +60
name: fireavert-appliance-shutoff-electric
components:
- id: main
label: "Appliance Information"
capabilities:
- id: refresh
version: 1
- id: soundDetection
version: 1
config:
values:
- key: soundDetected.value
enabledValues:
- fireAlarm
- id: switch
version: 1
- id: applianceUtilization
version: 1
categories:
- name: SmokeDetector
deviceConfig:
dashboard:
states:
- component: main
capability: soundDetection
version: 1
detailView:
- component: main
capability: soundDetection
version: 1
- component: main
capability: switch
version: 1
- component: main
capability: applianceUtilization
version: 1
label: "Appliance Power"
values:
- key: status.value
alternatives:
- key: inUse
value: "Appliance Powered On"
type: active
- key: notInUse
value: "Appliance Powered Off"
type: inactive
# automation:
# conditions:
# - label: "Smoke Detection Status"
# displayType: list
# list:
# alternatives:
# - key: fireAlarm
# value: Smoke Alarm Detected
# type: active
# - key: noSound
# value: No Smoke Alarm Detected
# type: inactive
# value: soundDetection.value
# valueType: string

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.

Suggested change
name: fireavert-appliance-shutoff-electric
components:
- id: main
label: "Appliance Information"
capabilities:
- id: refresh
version: 1
- id: soundDetection
version: 1
config:
values:
- key: soundDetected.value
enabledValues:
- fireAlarm
- id: switch
version: 1
- id: applianceUtilization
version: 1
categories:
- name: SmokeDetector
deviceConfig:
dashboard:
states:
- component: main
capability: soundDetection
version: 1
detailView:
- component: main
capability: soundDetection
version: 1
- component: main
capability: switch
version: 1
- component: main
capability: applianceUtilization
version: 1
label: "Appliance Power"
values:
- key: status.value
alternatives:
- key: inUse
value: "Appliance Powered On"
type: active
- key: notInUse
value: "Appliance Powered Off"
type: inactive
# automation:
# conditions:
# - label: "Smoke Detection Status"
# displayType: list
# list:
# alternatives:
# - key: fireAlarm
# value: Smoke Alarm Detected
# type: active
# - key: noSound
# value: No Smoke Alarm Detected
# type: inactive
# value: soundDetection.value
# valueType: string
name: fireavert-appliance-shutoff-electric
components:
- id: main
label: "Appliance Information"
capabilities:
- id: refresh
version: 1
- id: soundDetection
version: 1
- id: switch
version: 1
- id: appliancePower
label: "Appliance Power"
capabilities:
- id: applianceUtilization
version: 1
categories:
- name: SmokeDetector
deviceConfig:
dashboard:
states:
- component: main
capability: soundDetection
version: 1
detailView:
- component: main
capability: soundDetection
version: 1
values:
- key: soundDetected.value
enabledValues:
- fireAlarm
- component: main
capability: switch
version: 1
- component: appliancePower
capability: applianceUtilization
version: 1
values:
- key: status.value
alternatives:
- key: inUse
value: "Appliance Powered On"
type: active
- key: notInUse
value: "Appliance Powered Off"
type: inactive
automation:
conditions:
- component: main
capability: soundDetection
version: 1
values:
- key: soundDetected.value
enabledValues:
- fireAlarm
- component: main
capability: switch
version: 1
- component: appliancePower
capability: applianceUtilization
version: 1
values:
- key: status.value
alternatives:
- key: inUse
value: "Appliance Powered On"
type: active
- key: notInUse
value: "Appliance Powered Off"
type: inactive
actions:
- component: main
capability: switch
version: 1

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.

3 participants