Local capabilities aren't working in the current release, and you probably don't need one anyway. This looks like a virtual switch application, for which the power_switch capability is probably sufficient. See the Capability List for details.
Even if local capabilities were working, your action still wouldn't work because it's not properly structured. What you have in the capability should be in the entity config (with at least one other error corrected), and the local capability definition would need different data. But that's neither here nor there at the moment, because local capability definition is broken. I'll fix it in a future build, but given how few people have complained, nobody seems to be much missing it, and for your application I'm thinking power_switch is a better option anyway.