Maybe I'm getting to be an old dog, but my programming days go back to C and Unix and I'm not up, at the moment, to hone my object-oriented programming skills.
I've got some simple AppleScript code embedded in a Server Action on a Control Page in Indigo that switches a Somfy shade remote control from Open to Close:
#
# The original AppleScript was:
#
# if (binary outputs of device "Guest BR roller shades") is equal to {false} then
# set binary outputs of device "Guest BR roller shades" to {true}
# else
# set binary outputs of device "Guest BR roller shades" to {false}
# end if
#
I know this is simple switch logic, but could somebody help me do a quick conversion to Python? Thanks so much.