Update a sensor based on Lovelace page (does the backend know which View is being served?)

Is it possible to update a sensor when a specific Lovelace page is displayed?

I suspect not but the reason I ask is to restrict updates to only such a time as they are actually needed so as to reduce api calls to the service.

Specifically, I am thinking of the UK Transport sensor which has a fairly limited daily request allowance which severely limits the number of routes you can query. But if the info is only used to display in the front end it could be queried only when needed.

Why not Just build a button in your interface with an automation that does a single pull? Maybe even use a counter to display the number of clicks you can do for the rest of the day.

Yes I have that already (although not the counter - good idea!).
I just thought an automated update would be better especially if as I plane to one day I have panels on the wall to display information on.

Ah, well, I don’t think you can do anything yet. I doubt a feature like this will come anytime soon as well. I don’t think that lovelace can send any information to the state machine currently. You’d probably have to build a custom card that runs a service ‘under the hood’ without interaction on load. I think that would be very do-able.