nayelyz
(SmartThings Developer Support)
September 22, 2021, 12:01am
20
I checked some details with the engineering team and it seems this is the current behavior. To avoid any issues getting the new values of a preference value, take a reference to Persistent Store:
@nayelyz ,
Apart from this, which has also happened to me.
I have seen that only when you make a change in some value of the preferences, the lifecycle infoChanged is executed.
This is fine to manage if you have to take any action, such as stopping a timer or resuming it.
But I have seen that infoChnged is executed approximately every 1 hour and if at this moment a timer is being executed, for example to progressively change the level of a light bulb, the function stops the timer if you do not have a function implemented to check if there has been any change in preferences before stopping timer.
To make sure and implement or not this function of checking changes in preferences:
This periodic 1 hour run of infoChanged, is it programmed by default as the heath poll every 30 sec or is i…