From 81e9af6a556806eb03c8d8981f399945d3d8da77 Mon Sep 17 00:00:00 2001 From: Brian Hardie Date: Tue, 20 Sep 2016 21:34:17 -0700 Subject: [PATCH] Updated debug output in doCommand. When switch is on, "will try and turn switch ${theSwitch.displayName} off" When switch is off, "will try and turn switch ${theSwitch.displayName} on" --- smartapps/hackathon-demo/restful-switch.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smartapps/hackathon-demo/restful-switch.groovy b/smartapps/hackathon-demo/restful-switch.groovy index dc0b768..8656082 100644 --- a/smartapps/hackathon-demo/restful-switch.groovy +++ b/smartapps/hackathon-demo/restful-switch.groovy @@ -94,10 +94,10 @@ def updateSwitch() { def doCommand(theSwitch, command) { if (command == "toggle") { if (theSwitch.currentSwitch == "on") { - log.debug "will try and turn switch ${theSwitch.displayName} on" + log.debug "will try and turn switch ${theSwitch.displayName} off" theSwitch.off() } else { - log.debug "will try and turn switch ${theSwitch.displayName} off" + log.debug "will try and turn switch ${theSwitch.displayName} on" theSwitch.on() } } else if (command == "on" || command == "off") {