Hello I’m new to home assistant and I’m trying to learn how to set up a simple script.
I have 8 arlo cameras around my house and I want to receive a push notification with camera thumbnail when motion is detected.
Each camera save a thumbnail of the current footage when motion is detected in config/www/arlo overwriting the existing one.
For example camera.aarlo_front_door save a thumbnail in the file config/www/arlo/front_door.jpg when motion sensor binary_sensor.aarlo_motion_front_door change his state to on.
I also created an automation which works flawlessly:
alias: 'Camera Notification ' description: '' trigger: - platform: state entity_id: binary_sensor.aarlo_motion_front_door to: 'on' for: '00:00:01' condition:  action: - delay: '00:00:10' - service: notify.mobile_app_mi_note_10_lite data: message: Front Door title: Motion Detected data: image: 'https://XXXXX.duckdns.org/local/arlo/front_door.jpg' mode: single
The script just have to read which camera triggers the automation (for example camera.aarlo_front_door, camera.aarlo_back_door, etc) and replace the message (Front Door, Back Door) and jpg file name (front_door.jpg, back_door.jpg) in the notification.
Thanks in advance for the help.