Short answer: no. These are WiFi and trigger a preset encrypted buy message to Amazon. Very black box.
Long answer: yes, if you want to set up your own ghost Wi-Fi network that never actually reaches the Internet, accepts any activity as the trigger so you don't have to decrypt anything, and go from there. But it would be a huge amount of work for very little return. Much easier to just use a contact sensor.
Personally, I have high hopes for the flic button, which is supposed to start shipping this month. Looks like solid engineering, workable physics, nice form factor, and a decent price at under $50. And reprogrammable. I ordered five of them from the original indigogo campaign and we'll see how they work.
Meanwell, I'm using the Smarten IT three toggle switch to switch modes, and I like it a lot. Different form factor, of course.