home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.82k stars 28.95k forks source link

No Kwh with official Tuya integration #121008

Open bugs02004 opened 6 days ago

bugs02004 commented 6 days ago

The problem

Hi,

The official Tuya integration doesn't report Kwh on all devices. This entities does'nt exist with this integration. This intergration with github can do it: https://github.com/tuya/tuya-smart-life

could you fix it plz?

What version of Home Assistant Core has the issue?

core-2024.6.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

integration 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

No response

home-assistant[bot] commented 6 days 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!

Code owner commands Code owners of `tuya` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign tuya` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


tuya documentation tuya source (message by IssueLinks)

frenck commented 6 days ago

could you fix it plz?

Please provide debug information for the specific device you are having issues with.

bugs02004 commented 5 days ago

How? I don't understand. The problem being that the KwH entity does not exist at all with the current TUYA integration. So what is present on the majority of devices as connected sockets or circuit breakers. And that this entity goes back well with the integration that we find here unfortunately this version loses the token every 36 hours: https://github.com/tuya/tuya-smart-life

Could you add the KwH entity to Tuya plz compatible devices?

bugs02004 commented 5 days ago

With Tuya integration: sans kwh

With Tuya with the github: avec kwh

The are one more entity. The most useful entity.

frenck commented 5 days ago

Could you add the KwH entity to Tuya plz compatible devices?

There is no universal solution, please provide the diagnostics debug information for your device that is missing data according to you.

Thanks 👍

../Frenck

Klemvast commented 5 days ago

Heey Frenck,

Im having the same problem with atleast one of my meter breaker powered by tuya.

When checking the iot platform it says Today Ele, aswell within the Tuya app, but this is not shown as an entity by Home Assistant.

Added the diagnostic of the device in question here: tuya-b3593a6654125fa4ca36050da6c4653d-Zwembad-40bd841a9119f9d94741c90af47cbe50.json

Screenshot_2024-07-03-01-11-34-59_d448303990bb92d03c4d800220c6084a

frenck commented 5 days ago

@Klemvast Looking at the data Tuya provides for your device:

    "status": {
      "switch": true,
      "countdown_1": 0,
      "add_ele": 100,
      "cur_current": 1177,
      "cur_power": 2538,
      "cur_voltage": 2196,
      "test_bit": 2,
      "voltage_coe": 0,
      "electric_coe": 0,
      "power_coe": 0,
      "electricity_coe": 0,
      "fault": 0,
      "relay_status": "last",
      "light_mode": "relay",
      "child_lock": false,
      "cycle_time": "",
      "temp_value": 0,
      "alarm_set_1": "BwAAAA==",
      "alarm_set_2": "AQAAAAMAAAAEAAAA"
    },

There is no energy usage provided to us. Only add_elec which isn't usable for Home Assistant, as it is an addition to an unknown value at an unpredictable interval.

If you think this is an error, please reach out to Tuya.

../Frenck

Klemvast commented 5 days ago

@frenck

Thanks for checking this out, I made an report through the app on the device. Is there any other way though to gain an quicker reaction maybe from Tuya?

Friendly regards, klem

channafam commented 1 day ago

Smart Plug @frenck

I have the same issue - purchased the attached smart plugs with energy monitoring with a view to include into HA. I am surprised to hear that energy usage is not provided. Is there a workaround we can implement in HA - perhaps to add the provided add_elec to a energy entity which we can somehow create manually in HA?