Hi, I have the following automation to automatically show a popup using browser_mod when motion detected on my camera
Do I need a separate automation for each camera or can I somehow modify this one to cover multiple different camera motion events and show relevant image?
What is best way to also have a notification sound play when popup shows?
You can have multiple cameras under the “triggers” if they all have the same/similar actions. (BTW, in the UI, I find it easier to choose the trigger on the entity rather than device.)
Not sure what you mean by notification sound - do you mean to have the browser on your PC/tablet/phone play a sound?
Thanks. All of them would be same trigger e.g. motion and then showing the relevant event_image from that camera. But I mean motion from camera 1 and show event_image from camera 1, or if motion is from camera 2 then show event_image from camera 2 and so on for about 4 cameras
Yes, sorry should have been clearer - I have an Samsung Tab A9+ on the wall and when the above alert triggers and shows popup I want to make a notification sound or similar on the Android tablet
Below code works for me… at least for one Eufy camera I have tested (camera name below is “eufycam_lr”).
You can add other camera motion detection entity_id’s to the triggers section and the “regex” command in the template should replace “motion_detected” with “event_image” to get to the respective camera’s event_image entity.
For notification sound, I just added a “play_media” action, targeted to the browser ID identified by the browser_mod. (Note that the sound file is local to where I am running homeassistant, which is a raspberry pi, not the device where the browser is).
Not sure if this is the cleanest way, but hope it works for you.