added a check to avoid motor turning on just with a command (in AUTOMATIC_MODE_SWITCHING)