Dashboard Input Controls show AttribueTags as default values

Hi @Kyle_Stokes2,

Great question, in order to update attribute tags via an input control block, you will need to use the button trigger to trigger a workflow to run that will update your device attributes based on the text input in the input control block.

You will need to provide a payload to send to the workflow via your input control block:

The payload I’m sending is as follows:

{
    "updatedAttributeTags": {
    "attributes": [
      {
        "name": "vibration_xaxis",
        "dataType": "number",
        "attributeTags": {
          "static_warning_threshold": "{{text-0}}",
          "static_alert_enabled": "true",
          "static_warning_num": "3"
        }
      }
    ]
  }
}

Where {{text-0}} is the updated threshold value provided by your users.

The workflow associated with this input control block can be found here:


set-attribute-tags-develop(1).flow (1.8 KB)

We are using the virtual button trigger, associated with your input control block, to send a payload with updated attribute levels, and using the Device: Update node to modify the warning threshold level.

It’s important to note that when using this process, you’ll need to provide all of the attributes in the payload along with the updated values, otherwise if you only sent an updated value for your threshold, it would remove the alert_enabled and warning_number attributes.

That was a great call to search through the forums for older threads, you just didn’t happen to hit on ones that were as relevant:

https://forums.losant.com/t/add-attribute-to-device-programmatically-with-attribute-tags/3039/8

I’ll follow up here shortly with some more information on how to access attribute tags in context.

Thanks,
@Aidan_Zebertavage