Put the word “current” before the attribute.
So for a switch device def other_status = devicename.currentSwitch
should give you on or off in other_status
Another question. How do you do an AND or an OR function with in an IF. I was able to do it by nesting IF’s, but can’t seem to figure out how to do it within one IF. For example:
IF ( a==1 AND == 1). This gives me an error. (a and b are valid items, this is just an example.)
I had been reading that but I couldn’t find the operators. Still can’t find them in the docs, but I’m sure they are there somewhere. Thanks for the help. That worked fine.