From 577b1272870d15703f45f664c3fbeabec96cbca8 Mon Sep 17 00:00:00 2001 From: Juan Pablo Risso Date: Mon, 11 Jul 2016 10:04:32 -0400 Subject: [PATCH] PRP-151 Harmony cloud fix + PENG-161 - Allow setLevel (#1035) * PRP-151 - Harmony Cloud Added is IP Try around Integer.parseInt declare int p outside try * Remove unsubscribe & unschedule * PENG-161 - Allow setLevel for switch capability Last version --- .../logitech-harmony-connect.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smartapps/smartthings/logitech-harmony-connect.src/logitech-harmony-connect.groovy b/smartapps/smartthings/logitech-harmony-connect.src/logitech-harmony-connect.groovy index 250eb58..df4cd5a 100644 --- a/smartapps/smartthings/logitech-harmony-connect.src/logitech-harmony-connect.groovy +++ b/smartapps/smartthings/logitech-harmony-connect.src/logitech-harmony-connect.groovy @@ -688,7 +688,7 @@ def validateCommand(device, command) { def capabilityCommands = getDeviceCapabilityCommands(device.capabilities) def currentDeviceCapability = getCapabilityName(device) if (currentDeviceCapability != "" && capabilityCommands[currentDeviceCapability]) { - return command in capabilityCommands[currentDeviceCapability] ? true : false + return (command in capabilityCommands[currentDeviceCapability] || (currentDeviceCapability == "Switch" && command == "setLevel" && device.hasCommand("setLevel"))) ? true : false } else { // Handling other device types here, which don't accept commands httpError(400, "Bad request.")