04.05.2017, 18:00
You should replace event.getvalue() with grp.getvalue(event.dst), since event.getvalue() will always return the value that triggered the script. There's also a problem in case value changes twice during sleep: you will get two copies of the same script running.