I want to check the current state of my light. Reviewing the documentation, I think this should return “on” or “off”:
log.debug theswitch.currentState(“switch”)
However, I get this instead
"physicalgraph.device.cassandra.DeviceState@238bc586"
Could someone please help me figure out if my light is on or off?
tgauchat
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
2
For those trying to solve the same problem… note that the quotation marks around switch need to be single quotes. I thought groovy was pretty friendly about this, but not in my case. Here’s the working version. Look at the second line for the quotation mark update.