Make a sensor of your ordinary doorbell with RPi GPIO

It seems to be more of a problem when HA is busy and for short pulses (<1 sec). There’s more discussion here: https://community.home-assistant.io/t/pi-gpio-binary-sesnsor/