Simple Manual/Motion Switch Rules

Also some examples are here: