DynamicPage with refreshInterval not updating when first or only preferences page

Welcome, @raven42! Can you give me more details about the purpose of your SmartApp, please?
For example, why the refreshInterval is needed.
The code you shared is from a Groovy SmartApp, which is part of our legacy platform. It’s important you look at the announcement below so you can take precautions.