From 864fb907948b59dfab8e4c47a3f827135bdc78ec Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Sat, 4 Feb 2023 04:32:17 +0100 Subject: [PATCH] Update alarm notifications --- configuration/automations/alarm.yaml | 42 +++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/configuration/automations/alarm.yaml b/configuration/automations/alarm.yaml index a685476..92c1500 100644 --- a/configuration/automations/alarm.yaml +++ b/configuration/automations/alarm.yaml @@ -38,12 +38,29 @@ entity_id: camera.hallway - service: notify.home_assistant data: - title: "ALARM. Pending to disarm" - message: "Motion in hallway - {{ state_attr(trigger.entity_id, 'friendly_name') }}" + message: > + ALARM. Pending to disarm + Motion in hallway - {{ state_attr(trigger.entity_id, 'friendly_name') }} + @everyone target: [ "1070507369164984372" ] data: images: - "/config/www/cctv/hallway.jpg" + - service: camera.record + data: + duration: 30 + lookback: 30 + filename: /config/www/cctv/hallway.mp4 + target: + entity_id: camera.hallway + - service: notify.home_assistant + data: + message: > + Motion recording + target: [ "1070507369164984372" ] + data: + images: + - "/config/www/cctv/hallway.mp4" - id: alarm-away-living-roomn alias: '[Alarm] Trigger alarm when not at home (Living Room)' @@ -99,12 +116,29 @@ entity_id: camera.hallway - service: notify.home_assistant data: - title: "ALARM. Pending to disarm" - message: "Motion in hallway - {{ state_attr(trigger.entity_id, 'friendly_name') }}" + message: > + ALARM. Pending to disarm + Motion in Living Room - {{ state_attr(trigger.entity_id, 'friendly_name') }} + @everyone target: [ "1070507369164984372" ] data: images: - "/config/www/cctv/living_room.jpg" + - service: camera.record + data: + duration: 30 + lookback: 30 + filename: /config/www/cctv/living_room.mp4 + target: + entity_id: camera.hallway + - service: notify.home_assistant + data: + message: > + Motion recording + target: [ "1070507369164984372" ] + data: + images: + - "/config/www/cctv/living_room.mp4" - id: alarm-away-remaining alias: '[Alarm] Trigger alarm when not at home'