Both Xiaomi motion sensor and Xiaomi magnet sensor support the light sensing as a sideline, It’s pretty useful. But as a non profectional light strong sensor it can only provide illumination 1 - Weak(False) or 2 - Strong(True) as attributes.
HomeAssistant has already support LightSensor as a binary_sensor, wish homekit in Home Assistant support it too