Custom Capability

Hi!

Documentation mentions that it’s possible to create custom capabilities, however it does not say how to do that. Does anyone know of a sample device or other document to help with this?

My use case is to create device types for PushBullet and PushOver, both having capability “Push Notification” or something like that.

Thanks in advance.

I’ve seen this in another thread. I hope it works :smile:!

@Dianoga, @bflorian, @rappleg, @juano2310, @imbrian, @megapixel, @wackware

I asked about this yesterday and theoretically, you should be able to do the following.

In your device type, add custom attributes.
Your SmartApp can access it via device.customAttributeName

That said, it didn’t work when I tried to do it.

@Dianoga, no that doesn’t work. Also, it doesn’t work conceptually when a SmartApp needs an input of a device with certain custom capability.

My use case, send alert when UV index is too high.

It seems like you would need to be able to create a new instance of the capability class, but I am not sure where to do this. When I add something like:

definition (name: "Home Security", namespace: "bsileo", author: "Brad Sileo") {         capability "Switch"         capability "Configuration"         capability "Polling"         capability "multisecurity"         fingerprint profileId: "0104", deviceId: "0138", inClusters: "0000"     }

java.lang.RuntimeException: Metadata Error: Capability ‘multisecurity’ not found. @ line 12