Simply put, I have a device handler that comprises a presence sensor and a switch. When I create the device, Smartthings defaults to recognizing it primarily as a presence sensor (which is what I want)
However, SharpTools recognizes it primarily as a switch
I realise I can change the tile layout and use the Hero attribute but A) SharpTools should recognize the device the same way Smartthings does and B) The display is better looking when the device is recognized correctly.
I won’t call it a bug as it may be an intentional design choice. However you may decide that it’s a bug.
Here is a link to the device handler code, exactly as used in this example.
@Gary_Milne, you can change the layout to presence_tile layout in the beta site if that sensor has “presence sensor” capability. This is one of the new features under beta testing now that user can have more flexibility to change the tile layout as long as the expected capability is provided.
Gary-
Thanks for posting. I’d be interested in seeing the device handler code you mentioned.
As James mentioned, one of the new features currently in beta is the ability to choose from various tile layouts based on the capabilities the device reports.
SmartThings provides a list of the available capabilities, but doesn’t specify one of them as primary. As such, SharpTools uses the following order for determining the default capability to display (left most being the highest priority):
We prioritize Switch capabilities ahead of Sensor capabilities as most official sensor devices don’t also expose expose switch capabilities… and if a device does expose the switch capability, it’s usually a custom driver providing some way to take action on a device.