Device State Table Report if Greater than 0

I have 4 attributes (alarms) that I am monitoring using a device state table in a dashboard which can be seen here:
image

The way these attributes work are that when there is an alarm they report the value of the alarm that occured… at all other push times they report zero.
But I really only want to see the record (event) listed in the device state block if one or more of these attributes were greater than zero.
I know there is probably a way to use the handlebar helpers to do this but could anyone provide an example of how I could do this?

It would be extremely helpful to have experience user events but I know that this is not yet available and there is no set release date.

Thanks!
Leo

Hi @Leo_Bach1,

You are correct, this can be done with Handlebars! I made an example with three devices (Alarm 1, Alarm 2, and Alarm 3) that report 0 when there is no alarm and a string error when there is an error. In my Device State Block, I use the #ne (not equal) conditional block helper to display only when there is a string:

In your use case, you could use the #gt (greater than) helper to determine if something is greater than 0.

Let me know if I can help further,
Julia

1 Like

This definitely helped clear out some of the extraneous information:

Is there a way to remove the device name and timestamp unless one of the 4 other values are greater than zero?

In any case it is better than it was before.

Hi @Leo_Bach1,

The way the Device State Block is currently configured, there is no way to reference the attribute value within the Device Name cell. However, I will create a ticket for this with our engineers!

Thanks,
Julia

1 Like

That would be helpful.
Although, this is really being used as a workaround for an Event List or Open Event Idicator Block.
If one of these dashboard block types could be filtered for Experience Users then I wouldn’t bother with the Device State block.

Looks like the losant engineers have been busy!
Were these tags and filters just made available for Open Event Indicator and Event List blocks?

Looking great so far!

1 Like

Hi @Leo_Bach1,

Very observant! :partying_face: A Platform Update just went out, I will include a link to the detailed announcement when it is published on our blog. However, I believe the new changes to Events may be the answer in your use case. Four new Event Nodes have also been released, you can check out the documentation here:




Thanks!
Julia

1 Like

Spectacular work, Losant Team!
This is certainly a step in the right direction that comes from this all too common question:
I got an alarm… now what?
It seems to me that keeping track of how an organization reacts to events and changes in their systems is a good place to start answering this question.

Hi @Leo_Bach1,

The Platform Update article can be found here.

Thanks!
Julia