This project is superseded by Franck Nijhof's project as it is a way more accurate way of detecting a doorbell press. I'd definitely recommend to check his project out instead.
When you press a doorbell button, you complete an electrical circuit that allows household electricity to flow through the doorbell's internal electromagnet. The magnetic field generated by the electromagnet is then used to power a mechanism that creates the doorbell sound. By placing the reed sensor next to the 'dumb doorbell' you can sense it's magnetic field and integrate it in your smart home setup. Pretty neat huh?!
Sending a MQTT payload whenever the door sensor is triggered by the doorbell from the ESP8266 which can be read by Home Assistant. From thereon a notification event should started and notify me through Pushover's API.