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
73.19k stars 30.57k forks source link

TP-Link Kasa KP125M no longer reporting energy usage after latest update #121575

Closed Sarke closed 3 months ago

Sarke commented 3 months ago

The problem

I have two TP-Link Kasa KP125M. One is no longer reporting energy usage after latest update, while the other one is.

I also had to change the entity on both of them because the one I was using "todays_energy_usage" or something like that was no longer available, giving the "This entity is no longer being provided by the tplink integration. If the entity is no longer in use, delete it in settings." message.

What version of Home Assistant Core has the issue?

core-2024.7.1

What was the last working version of Home Assistant Core?

core-2024.6.4 or core-2024.6.3

What type of installation are you running?

Home Assistant OS

Integration causing the issue

tplink

Link to integration documentation on our website

https://www.home-assistant.io/integrations/tplink/

Diagnostics information

config_entry-tplink-81dfd97346ccc3dd7aafe6faa673bb16.json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.tplink.entity
Source: components/tplink/entity.py:207
integration: TP-Link Smart Home (documentation, issues)
First occurred: July 6, 2024 at 11:11:43 PM (14 occurrences)
Last logged: July 7, 2024 at 10:10:18 PM

Unable to read data for <DeviceType.Plug at 10.0.0.231 - Smart Energy Plug 1 (KP125M)> sensor.smart_energy_plug_1_today_s_consumption: get_energy_usage for Energy (error_code=JSON_DECODE_FAIL_ERROR)
Unable to read data for <DeviceType.Plug at 10.0.0.231 - Smart Energy Plug 1 (KP125M)> sensor.smart_energy_plug_1_this_month_s_consumption: get_energy_usage for Energy (error_code=JSON_DECODE_FAIL_ERROR)
Unable to read data for <DeviceType.Plug at 10.0.0.231 - Smart Energy Plug 1 (KP125M)> switch.smart_energy_plug_1_auto_update_enabled: get_latest_fw for Firmware (error_code=CLOUD_FAILED_ERROR)
Unable to read data for <DeviceType.Plug at 10.0.0.232 - Smart Energy Plug 2 (KP125M)> switch.smart_energy_plug_2_auto_update_enabled: get_latest_fw for Firmware (error_code=UNSPECIFIC_ERROR)
Unable to read data for <DeviceType.Plug at 10.0.0.231 - Smart Energy Plug 1 (KP125M)> switch.smart_energy_plug_1_auto_update_enabled: get_latest_fw for Firmware (error_code=UNSPECIFIC_ERROR)

Additional information

I haven't done any scripting on manual changes like that, but I am a bit new to the whole Home Assistant thing.

Here is the diagnostic for the one that works, in case you want to compare. They were bought in a two-pack, so should be similar.

config_entry-tplink-a236119e4e9d0c3c466f4998c5f09960 (works).json

home-assistant[bot] commented 3 months ago

Hey there @rytilahti, @bdraco, @sdb9696, mind taking a look at this issue as it has been labeled with an integration (tplink) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `tplink` 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 tplink` 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)


tplink documentation tplink source (message by IssueLinks)

Sarke commented 3 months ago

The main difference between the two diagnostic files I uploaded is that the working one has this section:

      "get_energy_usage": {
        "today_runtime": 1190,
        "month_runtime": 11270,
        "today_energy": 1742,
        "month_energy": 15094,
        "local_time": "2024-07-08 19:50:23",
        "electricity_charge": [
          0,
          0,
          0
        ],
        "current_power": 89444
      },
      "get_current_power": {
        "current_power": 89
      },
Sarke commented 3 months ago

Deleting it and re-adding it fixed it.