Change Input_select to default when browser opens or closes?

Is it possible to change the input_select value when opening or closing a browser?

I have the initial value set, which works great when refreshing Home Assistant but would like to default the input_select when opening or closing a browser.

I am using this in a lovelace custom state-switch and would like the first card to always be displayed when I open the browser.