Lovelace - Automation Based on Visible Entity?

Is it possible using Lovelace to trigger an automation based on what entity is currently visible on the screen/frontend? Example, I move to a tab or scroll down to view a virtual remote, this would trigger an automation to turn on my TV and sound system. Is something like that possible?

Have you found a solution to your problem? I would like to do something similar: update a sensor value with a http request every second, but only when someone is checking the value trough the UI.

Merijn

I never did find anything no, but I haven’t attempted it in a long time. Alot of progress has been made over the past two years, so something might be possible

Yes, I found what I was looking for (sort of): https://www.home-assistant.io/integrations/sensor.websocket_api/

There must be some connections opened by default (Android App? Node Red?) because I have 3 connected clients now, with only one tab open. It would have been nice to know which pages are open. Maybe it’ll be possible some day too.

Merijn