Early in my Home Assistant journey, I ran across https://labzilla.io/blog/homeassistant-door-chime - which I quickly adapted for my own needs. I already had a decent set of Sonos speakers and had just invested in the Unifi video doorbell.
When the doorbell rings, HA snapshots the current state of all the speakers, bumps up the volume a bit, plays a doorbell chime, and then restores everything back to where it was on the Sonos speakers. Quite a cool little trick if you ask me.
Only one teeny problem - every time my UDM Pro updated, the doorbell would ring. That was annoying, especially at 3am, the default update time. It has low PAF (Partner Acceptance Factor) too.
One afternoon, not too long ago, I was chatting with a fellow HA enthusiast friend, and he had a simple suggestion that might fix that bug. Turns out he was dead on!
Here is what he shared with me:
💡
There is a condition you can use to skip it if it's within x time from ha (Home Assistant) startup.
Or change the trigger to only trigger when it goes from off to on, and not simply to on.
I chose the latter, and now I can set the update time back to the default 3am without being worried about a false positive door bell ring.
Thanks friend <3
Here's the YAML to adapt for your needs, enjoy!
In case you are curious, here is the OLD version, prior to my friends suggested fix:
Note: added some additional context about the specifics of the updates