Skip to content

Commit

Permalink
[ICP-13444] Delete child switches on Flush Relay 1/1D (#40329)
Browse files Browse the repository at this point in the history
* Delete child switches on Flush Relay 1/1D
  • Loading branch information
MGoralczykS authored Aug 19, 2020
1 parent 2693291 commit 1c9918d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def installed() {
state.numberOfSwitches = 1
}

if (!childDevices) {
if (!childDevices && state.numberOfSwitches > 1) {
addChildSwitches(state.numberOfSwitches)
}
sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID])
Expand All @@ -93,12 +93,12 @@ def installed() {
}
// Preferences template end
response([
refresh((1..state.numberOfSwitches).toList())
refresh((1..state.numberOfSwitches).toList())
])
}

def updated() {
if (!childDevices) {
if (!childDevices && state.numberOfSwitches > 1) {
addChildSwitches(state.numberOfSwitches)
}
// Preferences template begin
Expand Down

0 comments on commit 1c9918d

Please sign in to comment.