Default Capability

I think I brought this up before but I believe I'm asking this as a question now and not a feedback

If you have a tile with multiple capabilities - how does the dashboard now which is the default? It's a huge PITA to create a dashboard while developing to watch functionality when the devices come up randomly. Is there no way to parse into the driver 'capability "motion sensor", "primary" or something like that? I've checked all the examples on hubitat/public and its driving me nuts that a switch shows for a presence sensor etc...!

I assume your question is restricted to Hubitat Dashboard and you're asking about the "automatic" creation option you get when first creating a Dashboard? If so, to my knowledge, the details of how the tile template is chosen in this case (this seems to be the crux of the question) are not public. However, from casual observation, it seems like they must have some predetermined ordered list/hierarchy of capabilities and will choose the first template where the driver's capabilities match the one that template works for. What that order is, again, I don't know; staff would probably need to comment, not that it would matter much unless anything changes.

There isn't anything you can do in a driver to make Dashboard see this differently (besides, of course, what capabilities you expose in general--but I'd use the device's real-world features to guide that decision). This is really only an issue if you let Hubitat do the work for you when making the initial Dashboard, which is only offered at the moment the Dashboard is created; any time after creation, or if you decline this option initially and manually create a Dashboard (this is what I almost always do, not that I use them much at all anymore), you have full control and this wouldn't be an issue.

This should not happen unless the "presence" device also implements capability "Switch", and in that case, there is, again, currently no way for Dashboard to know which you'd happen to prefer. If you're seeing wildly inappropriate default templates, e.g., for a capability the device doesn't have, that's another issue... :smiley: (and would sound like a bug)

I have the same reaction to the template defaults ... and I searched for an answer and found your thread.

One solution would be to allow a template default to be selected in each device. I find that I don't always recall which template is best - particularly when I create a dashboard months later.

It looks like templates are Hubitat created and can only be modified with CSS. For example, I couldn't find one that shows all the parameters of the Zooz 4-in-1 (motion, temperature, humidity, light level, plus battery level).

Is there something I am missing?

You are not missing anything. For devices that expose lots of capabilities like that one, you may need multiple tiles to snow everything you want (or a community solution to get arbitrary text onto a single tile, like Super Tile or Tile Master). There are some tricks you can use to make each tile look smaller, like making your Dashboard twice as tall as you want and making most tiles height 2 but these height 1

1 Like