xZetsubou / hass-localtuya

🔹 A Home Assistant integration to handle Tuya devices locally "fork from localtuya"

Home Page:https://xzetsubou.github.io/hass-localtuya/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: Differentes values ont

ddcorazon opened this issue · comments

LocalTuya Version

3.2.5

Home Assistant Version

2024.5.5

Environment

  • Does the device work using the Home Assistant Tuya Cloud component?
  • Is this device connected to another local integration, including Home Assistant and any other tools?
  • The devices are within the same HA subnet, and they get discovered automatically when I add them

What happened?

Hey @xZetsubou .
Hope You're doing well and thanks for your work.
I have a bug concerning the eletricity value showed in HA
I am using 3 Tuya smart plugs, 2 on Wi-Fi and one on Zigbee, which I use with the LocalTuya integration on Home Assistant. I have just noticed that the displayed consumption are not correct for the 2 Wi-Fi plugs (I am not sure if the issue is related to them being on Wi-Fi).

For the 2 Wi-Fi plugs, the consumption in Home Assistant (HA) is not accurate. For yesterday, I had (at the end of the day) 4.35 kWh and 1.51 kWh displayed using SmartLife, but the consumption shown in HA is 0.39 kWh and 0.27 kWh

What’s even more surprising is that, for example, around 1 AM (once the consumption resets at midnight and everything goes to 0), I have the same values like 0.09 kWh and 0.11 kWh on both SmartLife and HA, but by the end of the day, it’s no longer the same.

Another thing is on 1 of the 2 smart plug I have the current on HA being 1000x greather than on smartlife app (the unit is A and when you put it on mA it's way greater)

Using Home Assistant Tuya Cloud component? I can't manage to get The consumption(electricity) It doesn't display it as an entity but ineed. I only have the current, the power and the voltage

Steps to reproduce.

Here is a screenshot from HA showing

image

Here is a screenshot from tuya cloud for the same time (look like the device doesn't upload it consumption value)
image

Bellow is a screenshot from Smartlife app
image

And for the consumption Here is it fro today in Smartlife app
image

and the same in HA
image

Relevant log output

No response

Diagnostics information.

No response

The current isn't "x1000" just adjust the precision from HA entity settings popup

As for the Electricity this is a cloud DP and it's not meant to be for local usage however I still add, it's duplicated from #241 so let's stick on that issue.

If there's another issue besides Electricity feel free to comment here.

Hey,
Thanks for the response.
My display precision is at the minimum and when setting the unit to A i have for exemple 377A. I only have 1 computer on this plug. the current cannot be 377A!! Or maybee it is just a display bug?

image
image

And here The same plug using Tuya cloud integration.
image
image

So yeah maybee it's just a display bug
Thanks and have a great day

The Unit Of Measurement is incorrect, It's not 377 A it should be mA you have 2 options either you change the unit of measurement back to mA or let it on A but you will need to re-configure the device and on Current entity settings step set the scale factor to 0.001

Yeah i reconfigured manually and it's OK. Last time i used autodiscovery.

Thanks

Probably because before 2024.5.0 the auto configure will configure the entity with incorrect Unit :)