Attribute tags in dashboard

Hi, I have a suggestion regarding the values ​​that can be shown on dashboards.
In future versions, can we have access to the attribute tags in queries for dashboards?

For example, in image overlay block:

It would be nice if I could use the tag ‘units’ from my ‘temperaturaTrocadorDeCalor’ attribute, instead of using a static text ‘°C’.

It is not complicated to access this data in some blocks or even reproduce some blocks with HTML using JS. But some built-in blocks are very useful and much easier to make than from scratch, such as the image overlay.

Thank you!

It’s a good suggestion. There are two considerations we have to make, though, when implementing something like this:

  1. Most blocks, including the Image Overlay Block, allow for defining multiple devices (explicitly by ID and/or by tag query) in a segment, and the underlying data from all those devices resolves to a single value based on the aggregation method. So in those cases, which of the devices involved in the query should be the source of truth for that attribute tag value? What is Device A from the query has “F” for the unit and Device B has “C”?
  2. In the case of public dashboards and inline dashboards, we run the risk of exposing information to your end users that you may not wish to expose, as now we’d need to send those details about the underlying device(s) involved in the query back to the browser. What if, for example, somebody stores a token for accessing a third-party API in one of those tags? While it may not appear onscreen, it will be visible to the end user in the network traffic.

One workaround is if you use a device context variable (with the “Include full device info in context” option checked) to build the query. This assumes that you are only returning a value from a single device in the query. Bear in mind what I warned about, though, in that this will expose more info to your end user than just that single attribute tag value.

1 Like

Thank you for the answer, Dylan, I got the point.

About the workaround, I’ve used it in a custom HTML a few days ago, but then I “transfered” the block into my experience HTML code.