Multiple values in one indicator block

Trying to use an indicator block to display several pieces of data, but maybe this not possible.

Let’s say I want to query 8 different attributes but only display corresponding text if one or all attributes are ==1.

The purpose is to display an alarm text depending on if proper alarm bit is set. (each bit is an attribute)

@Lars_Andersson,

Yes, this is possible. Using the block you can have multiple queries:

Each query will get it’s on variable (value-0) that you can use to represent it in your expressions.

I have tried {{#if value-0}}{{value-0}}{{else}}Not set!{{/if}} , but it cant seem to ever match value-0, I even tried in enclosing as (value-0) , but I must be doing something else wrong.

What’s the type of and current value of the attribute?

it’s a number, and I just changed to 1, and it now works.
If I switch back to 0 it doesn’t.

@Lars_Andersson,

First, can you include a screenshot of your block configuration? Screenshots always help us help you.

Secondly, we are talking about the “Label” for the block. However, what do you have as the “Expression” for this label you’re trying to configure?

I think I have what I need now. The label is configured as foollows:
{{#if value-0 }}{{value-0}}{{else}}{{/if}}
{{#if value-1 }}{{value-1}}{{else}}{{/if}}
{{#if value-2 }}{{value-2}}{{else}}{{/if}}

What I didn’t know whas that when any of the values in the if statements are 0, nothing printed, but if the same value is set with just {{value-0}}, it does print 0.

The expression determines which label gets displayed. If you’re simply trying to display a label for each attribute and the numbers will always be 1 or 0, you can use the {{value-x}} as the expression and you wouldn’t need to use the #if helper in the Labels.

Expressions determine which Label to display.

I was hoping to display all the non zero messages in the same box, and that seems to be possible.