dimmer close logic