Automation: move if(auto) to setupAutomation