Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Kwh with official Tuya integration #121008

Open
bugs02004 opened this issue Jul 2, 2024 · 9 comments
Open

No Kwh with official Tuya integration #121008

bugs02004 opened this issue Jul 2, 2024 · 9 comments

Comments

@bugs02004
Copy link

bugs02004 commented Jul 2, 2024

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
Copy link

home-assistant bot commented Jul 2, 2024

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
Copy link
Member

frenck commented Jul 2, 2024

could you fix it plz?

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

@bugs02004
Copy link
Author

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
Copy link
Author

bugs02004 commented Jul 2, 2024

With Tuya integration:
sans kwh

With Tuya with the github:
avec kwh

The are one more entity. The most useful entity.

@frenck
Copy link
Member

frenck commented Jul 2, 2024

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
Copy link

Klemvast commented Jul 2, 2024

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
Copy link
Member

frenck commented Jul 3, 2024

@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
Copy link

Klemvast commented Jul 3, 2024

@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
Copy link

channafam commented Jul 7, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants