I’ve just used a standard 3 way toggle switch I got from Maplin (RIP) that was designed for small electronics projects. Wired up to lights and charger and currently attached to a small battery bag under my top tube. This goes to a usb hub rather than cache battery however.
I’ve also seen variations of this method mounted into a bar end, which looked really neat. Can’t find a photo now however, but I’m sure you get the idea.