The door button is connected to input 1. This is an indirect connection, the button trigger a relay (not on the Automation HAT). That relay does trigger a traditional doorbell, but also connect the 5V from the automation HAT to the input 1.
On relay 3 o I have a battery powered amplifier, the relay is between the amplifier and the battery. Turning the relay 3 on, power from the battery goes to the amplifier. This is done to avoid emptying the battery when no sound is produced.
At that point I can play audio on the analogue output of the Pi and play some music.
Randomly, the automation hat (library) would register an event when there was no one on the door. So I added some "debounce" to verify that the event is real and stay visible for an extra 0.1 second.
I hope this will not wake me up in the middle of the night or very early in the morning.