To align the magnet and device during installation, it can be helpful to assign pin 26 to the LED instead of WifiLED_n. This allows you to see immediately whether the magnet is triggering or not.
You can set it back to WifiLED_n afterwards.
btw. Is there a way to increase the sensitivity of the sensor or adjust the threshold value? Background: I have a window with two sashes and would like to attach the device to one and a stronger magnet to the other to monitor both. So far, I have achieved a detection distance of approx. 10cm, which is about 5cm short of a reliable detection.

You can set it back to WifiLED_n afterwards.
btw. Is there a way to increase the sensitivity of the sensor or adjust the threshold value? Background: I have a window with two sashes and would like to attach the device to one and a stronger magnet to the other to monitor both. So far, I have achieved a detection distance of approx. 10cm, which is about 5cm short of a reliable detection.