Adapted from Smart NightLIght - on when motion detected after dark, off at dawn or after motion stops - unless manually overridden