fix for contact sensor detection and restore dimlevel on switching dimmer back to on from pilight