- Code: Select all
timerPlugin.executeAction("setTimerStartValue", deviceId=1604521627, props={'amount':'30', 'amountType':'minutes'})
This is working fine but the issue I got is that when I change the timer's start time the timer goes back to inactive, if the timer is running. This in turn runs a trigger which fires on the timer being inactive but I don't want to run in that scenario. I have worked around the situation by checking the state of the timer before changing the start time, then restoring the timer's state after doing it. I also created a variable "DontChangeTimer" which I set to true before I change the timer and I can as a condition on the trigger I don't want to run. Then I set back to false once I finished changing the timer. This works fine but it seems a bit convoluted, is there a better way of doing this? In other words how can I increment a timer without changing it's state?
Thanks!