Is it possible to navigate the UI with a script or automation?

I would like to show a particular lovelace panel when a certain trigger happens. Actually, even more specifically, I would like to trigger the “more-info” pop-up of a card on that panel, so I get a detailed pop-up when that trigger happens. Up to now, I did not find a method to programmatically trigger UI actions in HA. Is this possible?

  1. Could I navigate to a panel in a script or automation?
  2. Could I programmatically click on a card on that panel so the more-info pop up shows up?

Use case: I want to show a live feed of a camera card when a motion event happens. HA already gets the motion event through an MQTT trigger fired by Blue Iris. I can make lights go on, but I can’t yet automatically show the live view of the camera in HA when the event is received.

1 Like

On which frontend?

What if there is no fronttend open?

What if there are 20 frontends open?

Well… all of them would be fine!

Isn’t there some sort of websocket communication between clients and server (such as here https://developers.home-assistant.io/docs/en/frontend_add_websocket_api.html) ? I think (but did not yet look into this) that you can send alerts to be shown on the UI no? Is somewhat the same…

Alternatively, is there a way to send a notification that opens a live camera view notification/alert on the UIs?

Anyway, I will look into this further, but if anyone has an idea, do let me know :slight_smile:

Hello,

I see there is not further conversation on the topic. Did you find out ? I would be interested as well… I was doing it with openhab and would like to do the same on home assistant. I would got to url because there I have the picture-elements on the all page with some service-button.

I haven’t tried this yet as I mostly use iOS to display my frontends, but I believe you could try this.

Not sure if it will automatically open the correct page, but you might be able to put a link in the notification. It would probably still require useraction however it would still be simple.

Hey, Did you ever figure this out? I would like to tell my HA to navigate to the home tab after a while.

Take a look at:

Don’t know if you have worked this out, but my entire Lovelace is set up the way you are asking and has worked flawless for quite some time, including an entirely touchless UI if desired and pretty much everything is automated with popups and user controlled settings. I will be releasing my new UI set up soon, but most of my posts are updated regularly. For a few ideas you can look at my repo and HA Forum post and for images of how popups look here.

3 Likes