i'm looking for help/advice with timers and pesters. i have a basic countdown timer serving as a sleep timer. works well - no problems. now, i would like a way that (e.g. with a keypad button press) i can implement the following logic: if timer is active and counting and button is pressed, i want to add a fixed amount of time (e.g.10 minutes) to the current timer value (and then have the timer continue/resume) counting down from the newly increased value.
the timers API -- if i am understanding correctly -- allow setting the START time of the timer but not touching the current time (understandable). so i can achieve what i want (i think) by pausing the timer, setting the timer's start time to be the timer's current remaining time + fixed increment, then restarting the timer. does that make sense or is there an easier way?
so next question: is there a way of accessing the current timer value (timeLeftSeconds, i think?) from outside the plugin, such as from an python-script trigger action?
would it work to use counterDevice.ownerProps["timeLeftSeconds"]? or counterDevice.states["timeLeftSeconds"]? i'm a bit vague on the details of different ways an object or a plugin can expose (or not) properties and what that means for how to access them from scripts.
thanks.