Try this:
{combos = {{key = "JOY_BTN12"}, }, down = iCommandBatteryPower, up = iCommandBatteryPower, name = "Battery power", category = "Electrical power control panel"},
Make sure your switch is indeed button 12.
Here is how I got a simple on/off switch to operate the landing gear on my A-10C. I altered my Button Box Interface.lua to this:
{combos = {{key = "JOY_BTN16"}, }, down = iCommandPlaneGear, up = iCommandPlaneGear, name = "Landing Gear Up/Down", category = "Landing gear panel"},
Hope it works for you.
Regards,
Milli