From 54c94440957086a0bf800a55168169fa0ed5fde4 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Mon, 12 Dec 2022 21:14:49 +0100 Subject: [PATCH] Add notification with screenshot --- configuration/automations/camera.yaml | 46 +++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/configuration/automations/camera.yaml b/configuration/automations/camera.yaml index e3b6638..911faeb 100644 --- a/configuration/automations/camera.yaml +++ b/configuration/automations/camera.yaml @@ -1,5 +1,6 @@ - id: camera_livingroom_notification alias: '[Camera] Living room notification' + mode: single trigger: - platform: state entity_id: binary_sensor.kitchen_motion_sensor @@ -27,10 +28,10 @@ entity_id: camera.living_room url: _: "/lovelace-tablet/cctv" - mode: single -- id: camera_hallway_notification +- id: camera-hallway-notification alias: '[Camera] Hallway notification' + mode: single trigger: - platform: state entity_id: binary_sensor.hallway_motion_sensor @@ -54,4 +55,45 @@ entity_id: camera.hallway url: _: "/lovelace-tablet/cctv" + +- id: camera-hallway-person-notification + alias: '[Camera] Hallway person detected' mode: single + trigger: + - platform: state + entity_id: binary_sensor.hallway_person_occupancy + to: 'on' + condition: + - condition: state + entity_id: alarm_control_panel.home_alarm + state: armed_away + action: + - service: notify.mobile_app_iphone + data: + message: > + Person detected in Hallway! + data: + entity_id: camera.hallway_person + url: + _: "/lovelace-tablet/cctv" + +- id: camera-livingroom-person-notification + alias: '[Camera] Living Room person detected' + mode: single + trigger: + - platform: state + entity_id: binary_sensor.living_room_person_occupancy + to: 'on' + condition: + - condition: state + entity_id: alarm_control_panel.home_alarm + state: armed_away + action: + - service: notify.mobile_app_iphone + data: + message: > + Person detected in Living Room! + data: + entity_id: camera.living_room_person + url: + _: "/lovelace-tablet/cctv" \ No newline at end of file