xZetsubou / hass-localtuya

🔹 A Home Assistant integration to handle Tuya devices locally "fork from localtuya"
https://xzetsubou.github.io/hass-localtuya/
GNU General Public License v3.0
443 stars 54 forks source link

[Bug]: Current from PC191HA incorrectly detected as A instead of mA #223

Closed NotActuallyTerry closed 6 months ago

NotActuallyTerry commented 7 months ago

LocalTuya Version

3.2.5

Home Assistant Version

2024.3.0

Environment

What happened?

The PC191HA (Arlec Grid Connect Smart Plug with Energy Meter) is automatically detected as reporting Current in A instead of mA

Steps to reproduce.

  1. Allowed LocalTuya to run auto-detection

Relevant log output

No response

Diagnostics information.

localtuya-2e03f8338f7ce09008a6e66a705e6b31-Office Desk-9bd18a1146c171251ab8ecd759655f68.json

xZetsubou commented 7 months ago

I think it may be better if we converted mA "same as official Home Assistant do with sensors unit` but I guess let goes this. usually I would take the measure of units from Tuya cloud data however it seems Home Assistant doesn't recognizes all Tuya units so it will require a convert function from Tuya -> HA if I decided to go with cloud data units. 😩

github-actions[bot] commented 6 months ago

This issue was closed because it was resolved on the release: []()

kazango commented 6 months ago

Is this actually fixed? It doesn't appear to be fixed on my instance after updating for my smart plugs with energy meters. Still showing the incorrect A instead of mA. Do I need to remove and re-add the devices?

xZetsubou commented 6 months ago

Do I need to remove and re-add the devices

Yes, usually I don't migrate the changes unless it critical one, However "auto configure entities" it just a helper feature I add, to make set-up entities easier and it only works on "set-up step".

Note that if you don't want to re-add the device you can just choose "re-configure device" and manually change the unit of temperature of the entities.

kazango commented 6 months ago

Do I need to remove and re-add the devices

Yes, usually I don't migrate the changes unless it critical one, However "auto configure entities" it just a helper feature I add, to make set-up entities easier and it only works on "set-up step".

Note that if you don't want to re-add the device you can just choose "re-configure device" and manually change the unit of temperature of the entities.

Can confirm that works, thank you.