I am having an issue where the every push notification to my smartphone is being sent/received TWICE.
I have a little automation which sends a push notification whenever someone presses my doorbell (which is old brass pushbutton wired back to a classic brass chime - with a Shelly 1 relay in the middle).
I have also added a random number to the message to check to see if it IS actually the same message and it is i.e. the random number is the same on both notifications.
Automation YAML pasted below if it helps.
I would love any suggestions to help me fix this!
alias: Front door bell
description: ""
triggers:
- trigger: state
entity_id:
- switch.shellyplus1_fcb467bef400_switch_0
from:
- "off"
to:
- "on"
conditions:
- condition: template
value_template: |-
{{ (as_timestamp(now()) -
as_timestamp(states.automation.front_door_bell.attributes.last_triggered
| default(0)) | int > 5)}}
actions:
- action: notify.notify
metadata: {}
data:
message: Doorbell Pressed {{ range(1000)|random }}" at {{now().strftime('%-d %b at %I:%M %p')}} title: Doorbell Pressed
data:
image: /local/tmp/last-frontdoor-motion.jpeg
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
mode: single
