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 Smart Home integration. L930 Light Strips not working after upgrade to HA 2024.7 #121115

Closed stevefraser1957 closed 3 months ago

stevefraser1957 commented 3 months ago

The problem

After upgrading to HA 2024.7 all my TP-Link L930 light strips stopped working. I believe the TP-Link integration has been revamped in this release.🤗 (All other TP-Link devices are still working.)

The L930 device(s) is present but there seems to be an issue with the entity. The error message says that “This entity is no longer being provided by the TP-Link integration.

I tried deleting one of the light strips so that I could readd it. It is subsequently automatically detected but when trying to then configure it I enter the correct TP-Link account credentials but get an authentication “unknown error” Related: If I log into the TP-Link website there is a Captcha check. Guess the issue is authentication related?

Hardware is Home Assistant Green. I’m a newbie to HA (Migrated from Openhab)

What version of Home Assistant Core has the issue?

2024.7.0

What was the last working version of Home Assistant Core?

2024.6.2

What type of installation are you running?

Home Assistant Core

Integration causing the issue

Tp-Link Smart Home

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.config_entries
Source: config_entries.py:586
First occurred: 20:32:46 (5 occurrences)
Last logged: 20:36:40

Error setting up entry Kitchen Right light strip L930 for tplink
Error setting up entry Kitchen Center light strip L930 for tplink
Error setting up entry Hall Archway light strip L930 for tplink
Error setting up entry Kitchen Left light strip L930 for tplink
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 586, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/tplink/__init__.py", line 165, in async_setup_entry
    device: Device = await Device.connect(config=config)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/kasa/device.py", line 233, in connect
    return await connect(host=host, config=config)  # type: ignore[arg-type]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/kasa/device_factory.py", line 71, in connect
    return await _connect(config, protocol)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/kasa/device_factory.py", line 110, in _connect
    await device.update()
  File "/usr/local/lib/python3.12/site-packages/kasa/smart/smartdevice.py", line 181, in update
    module._post_update_hook()
  File "/usr/local/lib/python3.12/site-packages/kasa/smart/modules/lightpreset.py", line 45, in _post_update_hook
    brightness=preset_state["brightness"],
               ~~~~~~~~~~~~^^^^^^^^^^^^^^
KeyError: 'brightness'

Additional information

No response

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)

sdb9696 commented 3 months ago

Hi, the issue in your logs should be partially fixed in the next patch release but the light preset functionality will be unavailable. It'd be great @stevefraser1957 if you are able to post diagnostics information once you've upgraded to 2024.7.1

stevefraser1957 commented 3 months ago

Hello Steven, I’ll certainly post the diagnostics info after the upgrade. Many thanks for your (speedy) efforts!

Best regards, Steve

On Thu, Jul 4, 2024 at 10:57, Steven B. @.***(mailto:On Thu, Jul 4, 2024 at 10:57, Steven B. < wrote:

Hi, the issue in your logs should be partially fixed in the next patch release but the light preset functionality will be unavailable. It'd be great @.***(https://github.com/stevefraser1957) if you are able to post diagnostics information once you've upgraded to 2024.7.1

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

stevefraser1957 commented 3 months ago

home-assistant_2024-07-05T17-05-49.684Z.log home-assistant_2024-07-05T17-03-56.657Z.log

Log files as requested by sdb9696 These were produced after the new HA Core update was installed. After the core update was installed the previous functionality of the L930 light strips was restored -- they all turn on and off as they did prior to the issue occurring -- have not explored any new functionality at this point. Also, after the HA Core update, I was able to successfully complete the installation of the light strip which I'd deleted previously. Excellent. Thanks.

stevefraser1957 commented 3 months ago

Hi Steven, Looks like the problem has been rectified. I’ve posted the log files on Githhub for you as requested. Thanks again.

Steve

On Thu, Jul 4, 2024 at 10:57, Steven B. @.***(mailto:On Thu, Jul 4, 2024 at 10:57, Steven B. < wrote:

Hi, the issue in your logs should be partially fixed in the next patch release but the light preset functionality will be unavailable. It'd be great @.***(https://github.com/stevefraser1957) if you are able to post diagnostics information once you've upgraded to 2024.7.1

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>