Add locking for dimmer