Hi Guys,
Are we able to do multiple capabilities for single input?
something like this
preferences {
section() {
input "thebutton", "capability.button, capability.battery"
Hi Guys,
Are we able to do multiple capabilities for single input?
something like this
preferences {
section() {
input "thebutton", "capability.button, capability.battery"
In short no.
http://docs.smartthings.com/en/latest/smartapp-developers-guide/preferences-and-settings.html#input
I see, meaning I need to have 2 handlers for that and need 2 options to input same device with different capabilities…
just weird…
anyway thanks @sidjohn1
Also no, the input type “capability.xxx” is a filter to select a device. You could use “capability.sensor” and almost every thing will show up. Once you have selected a device you have access to all of it attributes.
You may also want to read:
http://docs.smartthings.com/en/latest/capabilities-reference.html#capabilities-taxonomy
What i meant is this
preferences {
section() {
input "contactSensor", "capability.contactSensor"
input "devicesWithBatt", " capability.battery", multiple: true
def installed() {
subscribe(contactSensor, "device", contactSensorHandler)
subscribe(devicesWithBatt, "battery", batteryHandler)
}
During the selection, I will select 1 contact sensor for my contactSensor input and select same contact sensor for my devicesWithBatt input, so my contactSensorHandler just use to handle contact sensor event and my batteryHandler is use to handling all the devices with batteries
And I can’t find any attributes on capability.sensor
http://docs.smartthings.com/en/latest/capabilities-reference.html#sensor
I wanted to reply to this post because I’m having the same issue right now.
I have a custom device handler and I wrote a smart app that will use the switch capability and the notification capability.
Do I have to set up preferences to select a device for each capability or is there a way to set it up where I can just load one device and be able to use both capabilities?