so i was using your code above and then im getting a weird issue in Live logging and it makes me not able to see power status of the device. I added a debug into your code with this
Blockquote :
} else if (description?.startsWith(“catchall: 0104 0006”)) {
log.debug "Switch command catchall"
name = "switch"
value = description?.endsWith(“0000001001”) || description?.endsWith(“0B 01 0100”) ? “on” : “off”
}
But some weird way on the line name=“switch” ST is throwing this exception
description is: catchall: 0104 0006 01 01 0140 00 19F6 00 00 0000 0B 01 0100
: error groovy.lang.MissingPropertyException: No such property: name for class: script1501943925334445257082 @ line 43
You code sets “on” when it ends in 0B 01 0100 so I’m not understanding why ST is throwing this exception. Any ideas?