1
0

Move notifications back to automations

This commit is contained in:
Przemek Grondek 2023-02-02 15:04:54 +01:00
parent cb20c222d3
commit d361683234
2 changed files with 42 additions and 52 deletions

View File

@ -23,7 +23,27 @@
action: action:
- service: alarm_control_panel.alarm_trigger - service: alarm_control_panel.alarm_trigger
entity_id: alarm_control_panel.home_alarm entity_id: alarm_control_panel.home_alarm
- service: script.cctv_notify_hallway - service: notify.mobile_app_iphone
data:
title: "ALARM! Pending for disarm"
message: >
{{ state_attr(trigger.entity_id, 'friendly_name') }}
data:
entity_id: camera.hallway
url: "/lovelace-tablet/security"
- service: camera.snapshot
data:
filename: /config/www/cctv/hallway.jpg
target:
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') }}"
target: [ "1070507369164984372" ]
data:
images:
- "/config/www/cctv/hallway.jpg"
- id: alarm-away-living-roomn - id: alarm-away-living-roomn
alias: '[Alarm] Trigger alarm when not at home (Living Room)' alias: '[Alarm] Trigger alarm when not at home (Living Room)'
@ -64,7 +84,27 @@
action: action:
- service: alarm_control_panel.alarm_trigger - service: alarm_control_panel.alarm_trigger
entity_id: alarm_control_panel.home_alarm entity_id: alarm_control_panel.home_alarm
- service: script.cctv_notify_hallway - service: notify.mobile_app_iphone
data:
title: "ALARM! Pending for disarm"
message: >
{{ state_attr(trigger.entity_id, 'friendly_name') }}
data:
entity_id: camera.living_room
url: "/lovelace-tablet/security"
- service: camera.snapshot
data:
filename: /config/www/cctv/living_room.jpg
target:
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') }}"
target: [ "1070507369164984372" ]
data:
images:
- "/config/www/cctv/living_room.jpg"
- id: alarm-away-remaining - id: alarm-away-remaining
alias: '[Alarm] Trigger alarm when not at home' alias: '[Alarm] Trigger alarm when not at home'

View File

@ -31,53 +31,3 @@ cctv_off:
- switch.hallway_recordings - switch.hallway_recordings
- switch.hallway_snapshots - switch.hallway_snapshots
- switch.hallway_detect - switch.hallway_detect
cctv_notify_hallway:
alias: CCTV notify hallway
sequence:
- service: notify.mobile_app_iphone
data:
title: "ALARM! Pending for disarm"
message: >
{{ state_attr(trigger.entity_id, 'friendly_name') }}
data:
entity_id: camera.hallway
url: "/lovelace-tablet/security"
- service: camera.snapshot
data:
filename: /config/www/cctv/hallway.jpg
target:
entity_id: camera.hallway
- service: notify.home_assistant
data:
title: "ALARM. Pending to disarm"
message: "Motion in hallway"
target: [ "1070507369164984372" ]
data:
images:
- "/config/www/cctv/hallway.jpg"
cctv_notify_living_room:
alias: CCTV notify living room
sequence:
- service: notify.mobile_app_iphone
data:
title: "ALARM! Pending for disarm"
message: >
{{ state_attr(trigger.entity_id, 'friendly_name') }}
data:
entity_id: camera.living_room
url: "/lovelace-tablet/security"
- service: camera.snapshot
data:
filename: /config/www/cctv/living_room.jpg
target:
entity_id: camera.hallway
- service: notify.home_assistant
data:
title: "ALARM. Pending to disarm"
message: "Motion in living room"
target: [ "1070507369164984372" ]
data:
images:
- "/config/www/cctv/living_room.jpg"