I have created the automation below which will take a snapshot and send it to my phone and my wife’s phone when my doorbell camera detects motion. The doorbell is an Amcrest AD410 which is integrated using amcrest2mqtt. The binary_sensor.doorbell_motion
has a timeout of approximately 1 minute (e.g. it will trigger “on” and stay on for about 1 minute before turning “off” if there is no motion).
I have found that in some instances I will get two notifications at the same time with the same snapshot (see attached screenshot). I seems to happen randomly (I have not been able to reproduce it at will).
Any ideas why we would get duplicate notifications?
alias: Doorbell Motion
description: ''
trigger:
- platform: state
entity_id: binary_sensor.doorbell_motion
from: 'off'
to: 'on'
condition:
- condition: time
before: '22:00:00'
after: '06:00:00'
action:
- service: camera.snapshot
data:
filename: /config/www/tmp/snapshot.jpg
target:
entity_id: camera.doorbell_cropped
- service: notify.mobile_app_pixel_4a
data:
message: Front Door
title: Motion Detected
data:
channel: Doorbell
importance: max
group: human-detected
image: /local/tmp/snapshot.jpg
ttl: 0
priority: high
- service: notify.mobile_app_pixel_3a
data:
message: Front Door
title: Motion Detected
data:
channel: Doorbell
importance: max
group: human-detected
image: /local/tmp/snapshot.jpg
ttl: 0
priority: high
mode: single
1 post - 1 participant