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