Multiple device categories

My understanding is that you can list more than one category in a device profile, but what is the correct syntax to do this?

For example, if I want a device to be both a type Switch and a type CurPowerMeter, would I use this in the profile yaml?

categories:
      - name: Switch, CurbPowerMeter

This would be handy. Didn’t know this was supported

As categories is an array I’d presume that if anything it is:

      categories:
        - name: Switch
        - name: CurbPowerMeter

The only examples I can easily find of multiple categories is in device objects where the default one with categoryType: manufacturer is being added to with another with the categoryType: user which is how the icons are twiddled in the mobile app.

1 Like

OK I should note that device profiles, as in the /deviceprofiles endpoint, can only be created with 0 or 1 categories so my presumption may well suck.

1 Like

We can add categories to any component of a device, but I don’t know if and where they are used when they aren’t on the main component.

1 Like

@nayelyz Do you have any information on this? (see first post from me)

Hi, @TAustin
I’m already asking the team about this, they only confirmed what @orangebucket mentioned about the profiles endpoint only allowing one value but I’ve seen devices with more than one.

Once we have more info, we’ll let you know.

1 Like

OK thank you !

1 Like

Hi, @TAustin
Following up, it seems there’s no way of assigning two or more categories during the profile creation, but we can add more to it using the API but only to those that can still be edited. This means when their status is still “Development”, the ones created for a driver have the status “published” by default so any user can have access to them for their devices.
Can you provide more info about why you want to add more than one category to the profile?

A device can certainly have more than one function as defined by the SmartThings categories. For example it can be both a thermostat and a switch. The value in being able to declare a device has multiple categories is simply to reflect its functional capabilities and to be sure the device shows up in any list generated based on category -either within the SmartThings app or some other third-party integration that may present devices based on category.