Indicator Block explicit string expression evaluation not working as expected

Hello,
I have a dashboard Indicator block configured for Live Stream updates, with with the following expression: {{value-0}} === ‘open’ which is an evaluation of a string attribute on a device, for which a custom decoding workflow will set to either “open” or “closed” on the updated payload path at “data.decoded.door” beforehand, which is then used to set the actual device string attribute named “DoorState” in a “Device: State” workflow node. I can verify this attribute state is occurring as expected from dumping it into a DataTable also. However, I cannot get the Indicator block to properly evaluate the {{value-0}} === ‘open’ & {{value-0}} === ‘closed’ string expressions and select the different colour indicators as configured. It always triggers the Default state and colour on a live update. As far as I can tell from your Expression evaluation and other documentation, this should work as it should be being treated as a JavaScript string comparison.



I also cannot get the Indicator Block text or label to dynamically update from the Handlebars style Door Status {{data.decoded.door}} definitions either.

Am I missing something here?

Hello,
after reviewing the “Device State” node documentation here https://docs.losant.com/workflows/outputs/device-state (more than a few times I might add!) , observed the very small example screenshot that highlighted that the Handlebars style “{{” & “}}” braces are needed when assigning values to individual field attributes. After correcting this, I now have the Indicator Block string expression evaluation logic working as expected.

Hey @Andrew_Leckie1,

Glad you found the solution! I’ve submitted a ticket to improve the documentation to make it more clear that those fields are template fields that require curly braces.