Hrm, I’m wondering, since the glass directly covers the chin, could the very ambitious remove the paint from the interior of the glass and leave it clear (seeing the motherboard), or custom paint it.
Agreeing with John, this would just seem to be a replacement for the old laptop close sensor.
It would need to be recalibrated after repairs because a hall effect sensor and magnet pair form a vary… analog… arrangement. That is, while the values should be very repeatable in ‘static’ arrangement, as soon as things get jostled about, the values could jump quite significantly from pre-jostled ones.