Wireless Doggy Doorbell Mat

Check out the IDE example sketch "state change detection"
https://docs.arduino.cc/built-in-examples/digital/StateChangeDetection/