I’m currently experimenting to see if I can sense if curtains are closed using a window/door sensor, and some magnets above and below it (a few cm away) to hold the curtains closed around the sensor. It seems to work!

Rosemary Orchard @rosemaryorchard