Line 317 needs to be modified to include double slash for commenting: def adjustFan(device) { // for 3 speed ceiling fans