Error caused by capability unit

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

Please add ``` before and after your pastes to make them more readable.

```
Paste
```

Becomes

Paste

Why is this uppercase…

“[string “st/capabilities/aware.lua”]:235: Invalid value for SG.SG value: {unit=“SG”, value=1.025}

… when you do:

device:emit_event(customSG.SG({ value = sg, unit = “sg” }))

And keep the value numerical when you define value as a number.

after I modified there occurred one new problem

ERROR Multi-Sensor SMS-107 Driver V019 SCIONIX SMS-107 thread encountered error: [string “st/dispatcher.lua”]:267: Error encountered while processing event for <ZigbeeDevice: 84b082b6-8621-4ddf-9e87-6a8c823a3f67 [0xC907] (SCIONIX SMS-107)>:
arg1: added
arg2: {device_already_existed=true}

this may be a hidden problem on backside of unit problem

We would need more context/code…