when my device is paring and device is sending the data, edge driver
device:emit_event(customSG.SG({ value = 1.025, unit = “” }))
or
device:emit_event(customSG.SG({ value = sg, unit = “sg” }))
this part made an error and the log is
“[string “st/capabilities/aware.lua”]:235: Invalid value for SG.SG value: {unit=“SG”, value=1.025} error: Given SG for unit. Incorrect string given”
I made 6 more similar capabilities but only this capability made an error
capability is as following:
{
“name”: “SG”,
“ephemeral”: false,
“attributes”: {
“SG”: {
“schema”: {
“title”: “SG”,
“type”: “object”,
“properties”: {
“value”: {
“type”: “number”,
“minimum”: 0,
“maximum”: 2
},
“unit”: {
“type”: “string”,
“enum”: [“sg”,“”],
“default”: “”
}
},
“additionalProperties”: false,
“required”: [“value”]
},
“enumCommands”:
}
},
“commands”: {}
}
I can’t find any reason why only this capability made an error
Even though I have changed the capability to different name or unit"" ..the error is not fixed