Exactly what I was going to suggest. Just add some magnets to that when the window is cracked, it’s still showing as closed.
I’ve thought about doing things the opposite way too… mounting the magnet on the part that moves and then multiple sensors on the window frame. This would be quite expensive of course, but then depending on where the magnet is it would trip one of the sensors. This would allow me to know if it’s closed, open a little bit, or open a lot.
Again, potentially very expensive, but could provide some interesting uses.
For example: Make sure that if my whole home fan is on that there are enough windows open AND they are open far enough to provide adequate air flow… and turn off the whole home fan if there isn’t enough open.
Or: if rain in coming, report if windows are open alot so I can close them, but if they are only open a little, then don’t report on those.