From c4bb367c490a2f1a239ccc017cfbb085d580f5bf Mon Sep 17 00:00:00 2001 From: Donovon Simpson <66212896+trek-boldly-go@users.noreply.github.com> Date: Mon, 25 Nov 2024 13:50:11 -0600 Subject: [PATCH] Update cctv_ai_notification_script_UPDATE As per the [docs](https://companion.home-assistant.io/docs/notifications/notification-attachments/#media_source-recommended) the media folder should be preferred as it isn't public to the internet. I have tested and the notification still comes through with the image on my android. --- cctv_ai_notification_script_UPDATE | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cctv_ai_notification_script_UPDATE b/cctv_ai_notification_script_UPDATE index 26dbe8e..3eea76e 100644 --- a/cctv_ai_notification_script_UPDATE +++ b/cctv_ai_notification_script_UPDATE @@ -3,7 +3,7 @@ sequence: - service: camera.snapshot metadata: {} data: - filename: ./www/snapshots/driveway1_snapshot1.jpg + filename: ./media/snapshots/driveway1_snapshot1.jpg target: device_id: ***YOUR_CAMERAS_DEVICE_ID*** enabled: true @@ -16,7 +16,7 @@ sequence: - service: camera.snapshot metadata: {} data: - filename: ./www/snapshots/driveway1_snapshot2.jpg + filename: ./media/snapshots/driveway1_snapshot2.jpg target: device_id: ***YOUR_CAMERAS_DEVICE_ID*** enabled: true @@ -29,7 +29,7 @@ sequence: - service: camera.snapshot metadata: {} data: - filename: ./www/snapshots/driveway1_snapshot3.jpg + filename: ./media/snapshots/driveway1_snapshot3.jpg target: device_id: ***YOUR_CAMERAS_DEVICE_ID*** enabled: true @@ -45,9 +45,9 @@ sequence: Obvious Motion Detected." Your message needs to be short enough to fit in a phone notification. image_filename: - - ./www/snapshots/driveway1_snapshot1.jpg - - ./www/snapshots/driveway1_snapshot2.jpg - - ./www/snapshots/driveway1_snapshot3.jpg + - ./media/snapshots/driveway1_snapshot1.jpg + - ./media/snapshots/driveway1_snapshot2.jpg + - ./media/snapshots/driveway1_snapshot3.jpg response_variable: generated_content - if: - condition: template @@ -61,5 +61,5 @@ sequence: title: Driveway 1 Motion Detected message: "{{generated_content['text'] }}" data: - image: /local/snapshots/driveway1_snapshot2.jpg + image: /media/local/snapshots/driveway1_snapshot2.jpg mode: single