Conditionally enabling capabilities and tiles in a device type


(The fish is still dead.) #1

I’m working on updating a device type that works with multiple models of thermostats, some of which are capable of measuring humidity. I’d like to be able to only register the “Relative Humidity Measurement” capability and show the corresponding tile if the device actually supports it.

Is this possible?


(Geko) #2

Not possible, AFAIK.


(The fish is still dead.) #3

That’s what I figured. Thanks.

So now I’m left with a tile that either says “Not available%” because the units always have to be displayed OR I send the percent sign as part of the value which breaks any other apps like dashboards that expect a number.

How would you handle this, @Urman?


(Todd Wackford) #4

I have recently developed a device that may, or may not, have a temp probe installed. If it’s not installed, I send an empty string. The tile has a map in which when the value is empty, it sets the background to pure white. Then the unit char is washed out.


(The fish is still dead.) #5

Good idea!

Does your device just always report the temperature capability then?


(Todd Wackford) #6

Yes.

There is no way (right now) to dynamically create tiles. I hear from the little birdies though that this is coming.


(Brian Steere) #7

Another (ugly) alternative is to create an additional device type that doesn’t have the humidity capability. Then dynamically install the correct device type.


(The fish is still dead.) #8

Are these the same little birdies that told you that your Quirky stuff would be approved 6 months ago?

'Cause, you know… I like those birdies, but I’m not sure I’d trust them to fly south on time. =)


(Andrew Urman) #9

The best solution is to do what @Dianoga suggested. The device being tagged with the proper capabilities is better than what tiles it has. You don’t want SmartApps using the device as a humidity sensor if it doesn’t have humidity.


(www.rboyapps.com - Make your home your butler!) #10

Great thread so I’m going to revive it.

I’m building a device type to integrate blink cameras in the ST ecosystem. I’m trying to figure out if ST has an option to dynamically creates tiles? The issue is that blink operates in a cooperative environment, ie which each camera operates independently it is configured collectively. So I can’t create multiple devices to satisfy the collective criteria I want to dynamically create tiles, one for each camera discovered and then use the single device type to collectively configure them.

So does ST allow dynamic tiles now?


(Jeremy Stroebel) #11

I care more about the capabilities portion of this. Ironically enough I have this issue using some of RBoy’s device handlers.

Its crazy to have tons of different devices for thermostats when we could potentially just disable capabilities (and the corresponding commands) based on the differences. For instance my thermostat doesn’t do humidity or report back its battery status via zwave, but if those capabilities are on I get extra sensors and extra warnings downstream from the device handler being able to handle thermostats that do.

I can comment them out for this example, but have to remember I did that if/when I change out thermostats or introduce a different model that may bring those capabilities with it.

Do we have this ability yet? Or am I left trying to keep multiple device handlers in sync with lines commented out?