I have the typical magnetic contact sensor to detect whether my (front loading) washing machine door is open or closed.
The smallest part is attached to the round door with the adhesive sticker it comes with. Because the door is round and is sometimes closed forcefully, it detaches after a few days or weeks of use.
Does anyone have a simple solution to this (probably not uncommon) problem?
3D print an interface part: one side matching the round door, the other side matching your door sensor. Attach the sensor to the interface part with mounting tape, then the interface part to the door.
The small part is likely just a small magnet in a plastic housing. You can open it and take the magnet out and then find a better spot to place it possibly inside the door facing under the lip or something. You could also just use a stronger adhesive with the magnet like an epoxy
As mentioned above, the small part is usually the magnet… and most of the time they are pretty weak ferrite magnets, switching to a stronger magnet, like neodymium, will give you a wider range of usable mounting locations.