How to call a tap_action navigate action from a script?

I’d trying to call a tap_action navigate action from a script.

type: button
  action: navigate
  navigation_path: /lovelace-main/0

This works when pressing the button, but I don’t see anyway to do this from a script (or from an automation).

In trying to solve this problem most answers seem to suggest using the broswer_mod integration which has a navigate command, but this seems to require that the browsers be registered. Also, because I want to use this on a dashboard that I’m casting to multiple Google Nest Hub devices, browser_mod doesn’t work well for each screen individually (like the tap_action navigate action does).

Is there any way to call a navigate to a new path command from a script?

Thank you :slight_smile:

Lovelace is front end, it runs locally in the browser.
Automations and Scripts are backend, they run on the server itself.

browser_mod adds both backend stuff, and frontend stuff - that is accessed on the frontend via the websocket that the frontend uses to talk to the backend server.

You can however cast a dashboard to a Chromecast / Nest Display via a script or automation.