Device handler with dual capabilities?


(Eddy) #1

Hello there,

im looking to see if its possible to have 1 device handler that can have 2 "capabilities"
To clarify i would like to have 1 device that shows:

a contact sensor status of a xiaomi door sensor +
when i click on it i get to see another dumb switch on/off which i can bind another function.

Thanks


(Jimmy) #2

no. you can add both to your favorites on the home screen or create a room and put both in it.


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #3

A Device Type Handler can claim dozens of Capabilities.

Whether or not you can implement them in the same DTH is a different issue.

For example, SmartThing’s Contact Sensors (etc.) also have Capability “Temperature Measurement”.

It is rare that a Contact Sensor also has Capability “Switch”, but there’s nothing stopping you from making it a Virtual Switch in the same DTH.


(Eddy) #4

Thanks for clarifying it!
I started reading the documentation for developers and its relatively easy to follow even for someone with no groovy experience.

I ended up using multiAttributeTile. With a Switch having the “contact sensor” capability