Has anyone successfully created an app that senses interruptions and then ceases its behavior?
For instance, I would like to alter the “Gentle WakeUp” app, which gradually increases the light level on a dimmer switch. I would like to modify it so that if I use the app or actually get out of bed and manually hit the switch on the wall, the app will stop controlling the light.
I have tried to detect such a change via checking the switch state (is it in the previous state or the state I just set it to? No? Then we got interrupted), but the scheduling functions don’t take arguments or closures, and I’ve shown that the state between scheduler and schedulee is inconsistent, so I’m presently at a loss.
Some sort of “manual-override”, at least, should be easy, but it doesn’t seem to be.
Has anyone figured this out?