I’ve setup the following automation and it only occasionally works. If I check the logbook it rarely indicates that the bell had been pressed. UniFi protect correctly shows bell pressed x mins ago…
I’m using almost the same automation for my G4 (not pro) doorbells.
My triggers are slight different then yours, these are mine:
alias: "Security: Doorbell pressed"
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.frontdoor_doorbell
to: "on"
- platform: state
entity_id:
- binary_sensor.backdoor_doorbell
to: "on"
As you can see I only specify a TO state and ignore the FROM state.
Did you test the service call to alexa, does it work? I dont own an Alexa device so I can not tell you how that should work. My automation triggers all sonos media players in the house.
Thanks for sharing your code. I think that the problem is that I’m not always seeing the event in the logbook, so it’s not registering to trigger the automation. I’ve also set the user account it uses to full admin, which works once I think it’s something to do with the integration, but I’m not sure…