SharpTools and SmartThings default device recognition differs - probable bug

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.

1 Like

@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.

Since you are in the beta tester group, you can find more information from here. Thank you for helping beta testing. :slight_smile:

1 Like

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):

“Thermostat”, “Lock”, “Door Control”, “Garage Door Control”, “Music Player”, “Valve”, “Color Control”, “Switch Level”, “Switch”, “Fan Control”, “Fan Speed”, “Momentary”, “Button”, “Water Sensor”, “Motion Sensor”, “Presence Sensor”, “Contact Sensor”, “Temperature Measurement”

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. :slight_smile:

1 Like

Thanks, I will try it on the beta site and report back. Josh, I included a link to the code in my original post.


I saw the comment that you were leaving a link but I don’t see the actual link! :stuck_out_tongue:

My apologies, did the cut and not the paste.

Tried it on the Beta site and it appears to work correctly after selecting the Presence layout.

Still think it should have the same default behaviour as Smartthings but I’m very happy with this option.