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'