Here are photos:
Above, door is closed, so hinge is vertical, and magnet is near door/window sensor, so it reports "closed". Clear packing tape is my paranoia, as door vibration might shake open the cheap plastic case, and drop the battery down on the paintwork of a 1952 MG TD. Same for the twist-tie wire on the magnet. Yes, it is glued, and it is also a Neodymium magnet (NdFeB), so it has a very tight grip on the steel hinge, but as the Insane Clown Posse sang "Magnets - How do they work?"`
Above is the hinge in the "open" position, which will happen naturally when the door goes up, and along the ceiling, of course.