more G-Labs products

Author Topic: Turn Off Delay improvement  (Read 380 times)

January 15, 2017, 07:13:11 AM
Read 380 times

dstclair

  • *
  • Information
  • Newbie
  • Posts: 2
I had found it annoying if you have a turn off delay for say an hour, and you turned off your switch at 45 minutes, turned it back on at 50 minutes, 10 minutes later your switch would turn off.

I added program store tracking so that when the switch is turned on a target time (now + pause delay) value is saved. Subsequent calls update that, and the RunAsyncTask call has a value in it of the target time it was set to when that RunAsyncTask was initially called. If it doesn't match the current target time, it doesn't shut off the lights.


There are no comments for this topic. Do you want to be the first?