azure-iot-explorer icon indicating copy to clipboard operation
azure-iot-explorer copied to clipboard

[BUG] Cant enable boolean option in Command Payload

Open oedze opened this issue 1 year ago • 0 comments

Describe the bug We have a DTMI model that defines a command with a object payload, This object payload has 2 booleans. When i load them into the IoT Explorer, i can't enable any of the two booleans

DTMI:

{
    "@id": "dtmi:mycompany:components:upload;1",
    "@type": "Interface",
    "contents": [
        {
            "@id": "dtmi:mycompany:components:upload:format;1",
            "@type": "Command",
            "displayName": {
                "en": "Format"
            },
            "name": "format",
            "request": {
                "@type": [
                    "CommandPayload",
                    "Initialized"
                ],
                "displayName": {
                    "en": "Format"
                },
                "name": "format",
                "initialValue": {
                    "fat": false,
                    "lfs": false
                },
                "schema": {
                    "@type": "Object",
                    "displayName": {
                        "en": "Object"
                    },
                    "fields": [
                        {
                            "displayName": {
                                "en": "FAT"
                            },
                            "name": "fat",
                            "schema": "boolean"
                        },
                        {
                            "displayName": {
                                "en": "LFS"
                            },
                            "name": "lfs",
                            "schema": "boolean"
                        }
                    ]
                }
            }
        }
    ],
    "displayName": {
        "en": "UploadComponent"
    },
    "@context": [
        "dtmi:iotcentral:context;2",
        "dtmi:dtdl:context;2"
    ]
}

How it looks in the IoT Explorer

image

When i click on the checkbox, they don't activate, making it impossible to use.

To Reproduce Steps to reproduce the behavior:

  1. Create a device that has this component
  2. Load the DTMI model for this device
  3. Go to the commands tab for this component
  4. Click on the checkboxes.

Expected behavior When i click the button, i expect a checkmark to appear

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows
  • OS 10
  • App version 0.15.8

Additional context Setting the default value to true also doesn't work, they don't activate. It's not a pure visual glitch, becaus when i send the command to the device, the values are false.

oedze avatar Sep 12 '23 08:09 oedze