Device capability conflict

Within a device driver, how does one resolve duplicate capability methods?
As an example, both the alarm and switch have an off method, how do you create a specific handler for each one within the same device?
IE:
alarm.off()
switch.off()

vs:
off() which is called by the both…

For my needs If I could determine the source of the call (as in smartapp vs other) that would do the trick.

Seems silly to need a smart app to arbitrate this…

You can’t. The capability taxonomy is not very well designed to say the least. You’d have to use a custom command.

Uggg, where’s my wallBang gif…