Hi, I send on/off commands but never start the IF sentence… I attach the logs view…
Device Switch PowerControl CentraLite
def command = resp.data
log.debug "etag: ${etag}"
log.debug "command: ${command}"
def c = "'${command}'"
switches.each {
def state = it.currentValue("switch")
log.debug "switch: ${state}"
}
if (c == "on") {
log.debug "turning on.."
switches.on()
} else if (c == "off") {
log.debug "turning off.."
switches.off()
}
log.debug "ni on u off !!"
Regards,
Juan