Two capabilities, one device?


#1

Hubitat: I have a custom device that has a ‘Lock’ capability and a ‘Switch’ capability for an alarm system. ‘Lock’ is used to indicate ArmedAway and ‘Switch’ (On) is used to indicate ArmedStay. (Unlocked and Off would indicate Disarmed). My device is only listed once in the ‘Things’ list. I can get a tile on my dashboard to show the ‘Lock’, but I cannot figure out how to have a tile that shows the ‘Switch’? Is this possible?

Thanks.


#2

Matthew-
Thanks for posting. What are you aiming to accomplish with the two different device capabilities that isn’t provided with the native SharpTools HSM tile?

Depending on what the goal is, you can show the value of different device attributes using the Hero Attribute Tile Layout. While you are editing a dashboard:

  1. Tap the ... on the top-right of the tile corner and choose Change Layout
  2. Select Hero Attribute from the list of available layouts
  3. Tap the ... on the newly converted Hero Attribute tile and select Edit
  4. Choose your desired Primary Attribute and press Save

You can find some more information on the Hero Attribute tiles, including some screenshots, in the following post: Dashboard Themes and Hero Attribute Tiles

Edit: Also note that a thing can be added to a dashboard multiple times allowing you to view different Hero Attributes as desired.


#3

I do not use HSM (For my use case I do see any benefit that it may provide). I am seeking to display the status of my Alarm Controller device (I want to know if it is Disarmed, ArmedAway, ArmedStay). I attempted the Hero layout, but it only shows the ‘Lock’ attribute is available. I selected the show second attribute and my choices are ‘None’ or ‘Lock’. No ‘Switch’ attribute is available? I did add the device a second time and there was no different behavior (No Switch available),


#4

Ah, my apologies. I originally interpreted ‘alarm’ as HSM related based on the statuses that were described. :blush:

I forgot that this is a hold-over from SmartThings which only subscribes to events from the primary capability (in this case Lock) and a number of standard attributes if they are available (battery, humidity, temperature, power, motion, contact, smoke, carbonMonoxide as well as some weather related items). I’ll take a look at adding in attributes from the other subscribed capabilities for Hubitat devices.


In the meantime, an alternative approach would be to have a SmartApp which creates multiple child switches and coordinates them. For example, you could have two switches - one for ArmedAway and one for ArmedStay. That would provide the added benefit of being able to name each switch with an intuitive name and to use some of the cool tile highlighting features and icons that make it easier to see the status.

So instead of seeing ‘locked’ and ‘on’ as hero attributes, you could quickly glance and see ‘Armed Away’ was highlighted meaning it was active or everything off meaning the alarm is disarmed.

If I remember correctly, this is the approach the Alarm.com ST community integration took and there are a few SharpTools users who use it.


#5

That makes sense. I looked at my custom device driver and it does have ‘Capability’ of Lock and Switch, but it does not have those ‘attributes’. There is an attribute of ‘system’ that holds the Alarm system status (disarmed/armedAway/armedStay).

At one point I did have virtual switches to do as you described above to see the status, although I didn’t develop a SmartApp. I was hoping there was a more direct way to see the value of this driver’s ‘system’ attribute without those. I’ll keep tinkering. Thanks for the reply.


#6

At this point in time, we’re exposing attributes that are part of a core capability. I don’t recall system being part of a core capability, but I might be mistaken. I was reviewing other capabilities to see if there might be another text-based attribute which could also be helpful in showing the status, but nothing that really intuitively fit within a broader alarm system.