#trigger script on view change

1 messages · Page 1 of 1 (latest)

shy lotus
#

hey there im trying to figure out how to trigger a script on a view change and i cant for the life of me figure it out (niether can chat gpt) is thee any one who knows how to do this thanks.
i have tried through automations and scripts. its nothing crazy just want to start an rtsp feed when i switch to its view.

bitter quiver
#

You mean you want to do something when you switch to a certain view on your Dashboard? There is nothing by default in HA which shows active views, but browser mod can do this

shy lotus
#

yes i have looked into browser mod but wou;ldnt that only work with a computer and not on the HA app on a tablet ? sorry if im mis understanding how this all works

#

and yeah i want to trigger a script when i change views

#

do you know how to do with browser mod because ive tried and havent been able to get it to work

bitter quiver
#

Browser mod creates a device per actual physical device on which you use Home Assistant. And you can see the active dashboard view for each device

#

It provides entities for this

#

But what should this script of yours do?

shy lotus
#

all im trying to get the script to do is tella camera to turn its stream on so webrtc can connect

#

unfortunetly eufy cam 2 pro doesnt support constant rtsp or the ability to contact the camera to tell it to turn on natively so script is only way as far as im aware

rotund musk
#

So, there's really not enough space to have all the rooms in a house on the sidebar. I know, it scrolls but that's not ideal. I have a dashboard page that is just cards that link to dashboards for the individual rooms. The dashboards for the rooms are set to not display on the side navigation. They are only available from the room list dashboard. I could have the buttons run a script or automation instead that combined navigating and running whatever else I wanted to. I don't think there's a way to make this work for links on the side bar but if you were OK with having a dashboard to display sub dashboards, this should work.

shy lotus
#

yeah so i dont have enough yet to justify doing it room by room so i just have a couple pages internally to a dash board so technically im not switching between dashboards ill see if i can screen shot what i mean

#

this ones designed for iphone which is why its so skinny

#

but you can see up the tophow ive got the button cards that link to pages within the dashboard itself

#

i wann be able to press the cctv one and it have my cameras start streaming and it connect to web rtc

#

the other option i suppose is trying to make the buttons do two things at once but i havent been able to get that to work yet either

#

becuase i dont think you can change pages using scripts and i dont think you can have multiple actions on a mushroom button card

jovial goblet
jovial goblet
jovial goblet