If I in driver.compose.json define multiple onoff capabilities:
"capabilities": [
"onoff.upper",
"onoff.lower",
]
Then I register them as such in devices.json: this.registerMultipleCapabilityListener(['onoff.upper', 'onoff.lower'], ......
The multiple onoff buttons that appear works fine, however I do not get any flow cards for the onoff buttons. I only get flowcards if the capability is registered as a single “onoff” without the sub-capability naming. How do I enable flowcards for onoff.upper and onoff.lower?
I also noticed that when I try to run the Action “turn on all heaters” in homey it does not turn on any of the sub-capabilities. It only turns on when I have a root level “onoff” capability. Thus I changed the code such that it also has a root level onoff capability that will override any of the sub-level “onoff” capabilities.
I don’t mind if it is a bug in the Homey code. The way I used this capability to partially turn on/off is kind of odd anyway. Probably it would be better to set the power separately from the onoff button.
I might be wrong, but I think other devops ‘solved’ it by creating one device for every OnOff capability.
So, f.i. a 3-socket powerstrip has 3 separate socket devices?
Thanks, I changed my code so I only have one OnOff, then I could adjust the maximum Power with a custom capability enum. Turned out to be much more intuitive.