The answer to 'when to replace dimmer switch' is that you should replace your dimmer switch every 8-10 years, or sooner if it starts malfunctioning. Dimmer switches are electrical components that wear out over time due to the constant switching and heat generated. As they age, they become less reliable and can cause flickering, buzzing, or even stop working altogether.
It's important to replace your dimmer switch before it fails completely to avoid any electrical issues or safety hazards in your home. You should also consider replacing a dimmer switch if you notice any physical damage, such as cracks in the casing or loose wiring connections.