Check out Aqara water leak detectors. They have two external contacts that when they are bridged change the sensor state to ON. You can run wires to those contacts.
Interesting idea.
What if you made a pin switch in combination with the magnetic switch? Any magnet should work, the magnet from the magnet switch can be replaced with any magnet. Maybe you need a stronger one is all?
Surely the best approach here is a temp sensor with a threshold at which to alarm? Then you're actually monitoring the state of the appliance, not the state of the door.
While that is a solution and solves a big issue, especially like a power outage, a door sensor stops this problem long before that is an issue. My freezers and fridges are on the whole house generator, so power problems don't effect them. A temp sensor is still a valid thing long term but does not solve the problem I am trying to solve.
I second this... it also has the advantage of alerting you if fuse pops / someone's unplugged it / whatever reason.
There was a recent discussion about this very topic recently...
homeassistant
Home Assistant is open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server. Available for free at home-assistant.io