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

Taking Action
Message Indicated on DisplayMazda 6 Owners Manual: Lights-On Reminder
The lights-on reminder is operable when the time setting*1 of the auto headlight
off function is off.
If lights are on and the ignition is switched to ACC or off, a continuous beep
sound will be heard when the driver's door is opened.
*1 If the light switch is left on, the auto headlight off f ...
Mazda 6 Owners Manual: No.9 tcs off light stays on more than 4 seconds with ignition switch on
When performing an asterisked (*) troubleshooting inspection, shake the
wiring harness and connectors while
doing the inspection to discover whether poor contact points are the cause
of any intermittent malfunction. If
there is a problem, check to make sure connectors, terminals and ...