How is mirror heating controlled?

Bathroom mirror heating is not controlled. It turns on and off with the lighting switch. It also can be connected to mirror illumination to see when mirror heating is on.