Enable integration automatic polling only when visiting a certain dashboard page

I have a page in the dashboard showing some trains departure fetched by an integration which has automatic polling enabled.
As I only look at this page few minutes per day, I would like to find a way to disable the automatic update of the train timetable when I don’t need it in order to save useless API requests.

One way of doing this would be to disable automatic polling for the integration and create an automation that forces the entity update every 30 seconds or so; I could then have a switch that controls whether this automation is turned on or off.

However, it would be good to control this automatically so that, whenever I load the page where the data is supposed to be shown, the aforementioned automation is automatically activated and the entities are updated. When I leave the page then the automatic update of the departures should be turned off again.

Is this possible at all? I guess the currently visited page in the dashboard is not exposed as sensor/attribute and handling the case where different devices or users visit the same page and trigger the update would be a pain…

What integration are you using. It may or may not be possible but it completely depends on what integration you’re using to get the data

For instance of its the REST integration you can’t turn it on and off but you can add a scan interval to throttle the pulls to something with a longer window that’s still useful but pulling less than you are now.

Another possibility is it’s a push integration and you are getting updates on triggers. In this case there’s nothing to configure

We don’t know unless we know what the integration is.

Hi, I’m using the HVV integration (HVV Departures - Home Assistant)