Skip to content

Commit e8fb397

Browse files
authored
ICP-3956 Smoke sensor pairing without configuring (SmartThingsCommunity#2914)
Updates the "secure" detection method to be more in line with modern practices.
1 parent d694da6 commit e8fb397

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

devicetypes/smartthings/fibaro-smoke-sensor.src/fibaro-smoke-sensor.groovy

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def parse(String description) {
124124
descriptionText: "This sensor failed to complete the network security key exchange. " +
125125
"If you are unable to control it via SmartThings, you must remove it from your network and add it again.")
126126
} else if (description != "updated") {
127-
log.debug "parse() >> zwave.parse(description)"
127+
log.debug "parse() >> $description"
128128
def cmd = zwave.parse(description, [0x31: 5, 0x71: 3, 0x84: 1])
129129
if (cmd) {
130130
result = zwaveEvent(cmd)
@@ -475,6 +475,11 @@ private isConfigured() {
475475
private setSecured() {
476476
updateDataValue("secured", "true")
477477
}
478+
478479
private isSecured() {
479-
getDataValue("secured") == "true"
480+
if (zwaveInfo && zwaveInfo.zw) {
481+
return zwaveInfo.zw.endsWith("s")
482+
} else {
483+
return getDataValue("secured") == "true"
484+
}
480485
}

0 commit comments

Comments
 (0)