Using the same capability more than once

It’s currently available to use the same capability more than once. while configuring sonoff wall switch i had to add 3 onoff capability. Couldn’t how to do it yet without adding 3 devices which pretty annoying.
anyone has come through this
appending dot followed by an identifier after the capability id isn’t available anymore

What makes you conclude that? Because it should work.

I couldn’t get it to work and read in a few topics that it’'s available currently

this.registerCapabilityListener([‘onoff.1’, ‘onoff.2’ ],

am i initializing correctly

Make sure they are defined in app.json.

Also, registerCapabilityListener is meant for only one capability; if you want to listen on multiple capabilities (even if they have the same “base”), use registerMultipleCapabilityListener.

        ["onoff.1", "onoff.2", "onoff.3" ],

i tried it like this and i made sure that it’s defined in app.json and in driver.compose.json
however it doesn’t work

can i register only one onoff capability with multiple channels ?

You have to be more elaborate than just “it doesn’t work”.

What do you mean by “multiple channels”?

it literally doesn’t work no debugging prints executed nothing
it appears as three onoff switch in the app but none of them execute anything
below is the onCapabilityonoff function

async onCapabilityOnoff( value, opts ){
const devicesCache = this.getData();
const mac =[1][“mac”];
const arpTable = { “ip”: “”, mac };
const connection = new ewelink({ devicesCache, arpTable });
if (value == true )
var tog = ‘on’;
var tog = ‘off’;
this.log(value, “tog”, tog);
var status = await connection.setDevicePowerState([0],[0][“deviceid”], tog , 3);

      this.log("3", status);


Does it? Can you post a screenshot? I didn’t think that the app supported subcapabilities (it would only show the first onoff capability).

I guess it was typo after all, it works fine now
thanks a lot for your support

[“onoff.1”, “onoff.2”, “onoff.3” ],