Open wasp100 opened 2 months ago
Hey there @tuya, @zlinoliver, @frenck, mind taking a look at this issue as it has been labeled with an integration (tuya
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
tuya documentation tuya source (message by IssueLinks)
Hi! Any feedback on this @frenck ? Thanks
@frenck can you please advise? Seems like HA is showing the mA value as an Amp value hence the value is out by a factor of a 1000.
Please attach a download of the diagnostic of this device from Home Assistant and attach it to this issue (as requested by the issue template as well).
Thanks already 👍
../Frenck
Hi @frenck , see below extract of diagnostic: I see the current is being measured in mA. I've drawn the diagnostics of another tuya device and that shows Amps. I can't seem to understand why the one device is measuring in mA and the other in Amps
"function": {
"switch_1": {
"type": "Boolean",
"value": {}
},
"countdown_1": {
"type": "Integer",
"value": {
"unit": "s",
"min": 0,
"max": 86400,
"scale": 0,
"step": 1
}
},
"relay_status": {
"type": "Enum",
"value": {
"range": [
"power_off",
"power_on",
"last"
]
}
}
},
"status_range": {
"switch_1": {
"type": "Boolean",
"value": {}
},
"countdown_1": {
"type": "Integer",
"value": {
"unit": "s",
"min": 0,
"max": 86400,
"scale": 0,
"step": 1
}
},
"relay_status": {
"type": "Enum",
"value": {
"range": [
"power_off",
"power_on",
"last"
]
}
},
"add_ele": {
"type": "Integer",
"value": {
"unit": "kwh",
"min": 0,
"max": 50000,
"scale": 3,
"step": 100
}
},
"cur_current": {
"type": "Integer",
"value": {
"unit": "mA",
"min": 0,
"max": 30000,
"scale": 3,
"step": 1
}
},
"cur_voltage": {
"type": "Integer",
"value": {
"unit": "V",
"min": 0,
"max": 5000,
"scale": 1,
"step": 1
}
},
"cur_power": {
"type": "Integer",
"value": {
"unit": "W",
"min": 0,
"max": 80000,
"scale": 1,
"step": 1
}
}
},
"status": {
"switch_1": false,
"countdown_1": 0,
"relay_status": "power_off",
"add_ele": 100,
"cur_current": 0,
"cur_voltage": 2397,
"cur_power": 0
Diagnostics of the other Tuya device shows current in Amps (which is correct) "cur_current": { "type": "Integer", "value": { "unit": "A", "min": 0, "max": 50000, "scale": 3, "step": 100 }
@frenck Does this help with figuring out what’s going on with the incorrect current value? Thanks
The problem
I’ve recently connected a Tuya smart switch rated at 30 amps to control the water heater. I’ve integrated into Home Assistant using the official Tuya app. I’ve noticed that the current shown in the Tuya app is correct at 18A, however in HA, it shows as 0.018A!! It is wrong by a factor of a 1000. Can we please fix?
What version of Home Assistant Core has the issue?
2024.4
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Tuya
Link to integration documentation on our website
https://www.home-assistant.io/integrations/tuya/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
I have another Tuya smart switch controlling a pool pump (which draws about 5A) and this amp value is correct in HA. Could it be perhaps a limit in the code for the current drawn in HA? Perhaps, if it’s greater than 10A, it shows the wrong value??