Rate limit is blocking access - could one limit accesses to happen only while a corresponding widget is shown?

I am trying to use an integration “swiss public transport” which allows to display the next connections from our nearest tram and bus station and which - in principle - is terrific and VERY useful. BUT it has a (probably not so seldom) issue: the service which it depends on allows only for 1000 requests a day.
Thus, if I let it run continuously, the display practically always shows only an error msg essentially rendering this integration useless. :frowning:

I am wondering if one could change that constant polling to a mode where the integration only requests data while the corresponding widget is actually visible on-screen. One could then place that widget on a dashboard tab that one only displays when needing that info. Of course one must then never forget to hide that tab again after “consuming” the info to stop further requests, but I’ld say that would be acceptable.
Is it possible to signal from the UI widget to the underlying integration if and when the widget is actually “active” (i.e. being displayed on-screen)?
Of course that would require in the first place that the UI widget somehow “knows” that it is currently active on-screen. Not even sure if that is a given…

Hope I could make myself clear…

Hey Michael,

the documentation of the component has some details regarding the rate limit handling. It contains a hint on how to lower the refresh rate in case you need multiple location. Please check this.


The Swiss public transport API only allows 1000 requests per 24 hours. The default polling rate is set to 90s , which is just enough for one connection polling continuously. If more entries are needed, consider defining a custom polling interval to reduce the amount of requests.