When a SmartThings device is switched off, set a variable to false in Apilio