Determine if a user is on a specific dashboard view

I am trying to do a workaround for my zigbee light dimmer (Miboxer FUT35Z+) in Zigbee2MQTT not updating when the wall push switch is used. I can publish a get {“state”: “”} and the device will refresh with whatever the wall switch did.
Rather than hammering MQTT with get messages, I thought a simple workaround would be to only publish this MQTT message while the dashboard view (app or webpage) containing the light control is active, maybe every 5 or 10 seconds.
Is there a way to determine if a view is currently seen by the user?

As a side note, I have tried state action and availability in Zigbee2MQTT, but they do not update the state.