The coming home light turns on the headlights (low beams) when the lever is operated.
To turn on the lights
When the lever is pulled with the ignition switched to ACC or OFF, the low beam headlights turn on.
The headlights turn off after a certain period of time has elapsed after the doors are closed.

NOTE
Flashing the Headlights
Leaving Home LightMazda 6 Owners Manual: Door switch removal/installation
Front
1. Disconnect the negative battery cable.
2. Remove in the order indicated in the table.
3. Install in the reverse order of removal.
Rear
1. Disconnect the negative battery cable.
2. Remove in the order indicated in the table.
3. Install in the reverse order of removal. ...
Mazda 6 Owners Manual: No.3 passenger-side air bag cut-off indicator light does not illuminate
Diagnostic Procedure
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 connec ...