Take the appropriate action and verify that the warning light turns off.

Taking Action
Message Indicated on DisplayMazda 6 Owners Manual: Moonroof (Some models)
The moonroof can be opened or closed electrically only when the ignition is switched
ON.
WARNING
Do not let passengers stand up or extend part of the body through the open
moonroof while the vehicle is moving: Extending the head, arms, or other parts
of the body through the moonroof is dan ...
Mazda 6 Owners Manual: Diagnostic trouble code number inspection
1. Remove the glove compartment.
2. Short the A/C check connector to the GND terminal using a jumper wire.
3. Shine a 60 W incandescent light from a height of approximately
100 mm {3.9 in} onto the solar radiation sensor.
Note
When incandescent light does not shine on the solar radiatio ...