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

Light entity is no longer provided by the tapo integration #825

Open
naamah75 opened this issue Jan 4, 2025 · 33 comments · May be fixed by #826
Open

Light entity is no longer provided by the tapo integration #825

naamah75 opened this issue Jan 4, 2025 · 33 comments · May be fixed by #826

Comments

@naamah75
Copy link

naamah75 commented Jan 4, 2025

Home Assistant

Core 2025.1.0
Supervisor 2024.12.3
Operating System 14.1
Frontend 20250103.0

Version of the integration

tapo 3.1.2

Configuration

L510
da TP-Link
Firmware: 1.1.9
Hardware: 3.0

Describe the bug

The tapo component is loaded and some integration entries are available (eg. overheat and signal level), but the main entry for the light component is missing.

image
image

Debug log


Questo errore ha avuto origine da un'integrazione personalizzata.

Registratore: custom_components.tapo.coordinators
Fonte: helpers/update_coordinator.py:411
Integrazione: TP-Link Tapo (documentazione, problemi)
Prima occorrenza: 08:49:43 (14 occorrenze)
Ultimo accesso: 09:53:41

Error fetching tapo data: Unexpected exception:

@viba1
Copy link

viba1 commented Jan 4, 2025

Hi,
Same problem here, since migrating to 2025.1.0.

Some logs:

ERROR (MainThread) [custom_components.tapo.coordinators] Error fetching tapo data: Unexpected exception: [homeassistant.components.light] Error adding entity None for domain light with platform tapo

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 825, in _async_add_entity
capabilities=entity.capability_attributes,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 1116, in capability_attributes
if LightEntityFeature.EFFECT in supported_features:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'int' is not iterable

@PlanetCitizen1829381
Copy link

Device info
L535
by TP-Link
Firmware: 1.1.5
Hardware: 3.0

Same Issue for Tapo Smart Bulb L535.
Only occurred after updating HA to 2025.1.
Have restored HA to 2024.12.5 and devices are available again.
HA Core Update 2025.1 seems to break it.

@samuelepozzebon
Copy link

Same issue with a L630 (firmware 1.1.2).

HA version 2025.1.0

@TopoAS
Copy link

TopoAS commented Jan 4, 2025

Same issue with a L530
HA version 2025.1.0

@indomitorum
Copy link

Exactly the same here. Light entity does not exist all of a sudden. 2025.1 has broken the custom tapo integration for lights

L530

@mcderd-coder
Copy link

Same for me today, HA 2025.1.0

L630 bulb (firmware 1.1.2) has become unavailable, my Tapo plugs are still working

@iDrunK65
Copy link

iDrunK65 commented Jan 4, 2025

Same on this with HA 2025.1.0

L530
by TP-Link
Firmware: 1.1.9
Hardware: 3.0

@Clickfr
Copy link

Clickfr commented Jan 4, 2025

Same here with two L530 but no issue so far with my L900.

No worry with the plugs.

@aidanharris
Copy link

I don't think we need all of the "Me too" comments, unless you have something new to add. Please subscribe to the issue instead.

The Tapo integration has had this deprecation WARNING for ages now. I'm guessing this is the culprit?

WARNING (MainThread) [homeassistant.components.light] Entity None (<class 'custom_components.tapo.light.TapoLightEntity'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <LightEntityFeature: 0> and color modes, please create a bug report at https://github.com/petretiandrea/home-assistant-tapo-p100/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation

@Clickfr
Copy link

Clickfr commented Jan 4, 2025

Hummm.... Surprisingly, same issue with my Govee H7020 it stopped working exactly at the same time as the Tapo L530: 23:24:43 on Jan 3rd.

And now both return the same error at statup:

TAPO:

Logger: homeassistant.components.light
Source: helpers/entity_platform.py:825
integration: Light (documentation, issues)
First occurred: 19:32:22 (2 occurrences)
Last logged: 19:32:22

Error adding entity None for domain light with platform tapo
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 825, in _async_add_entity
capabilities=entity.capability_attributes,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 1116, in capability_attributes
if LightEntityFeature.EFFECT in supported_features:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'int' is not iterable

GOVEE:

Logger: homeassistant.components.light
Source: helpers/entity_platform.py:608
integration: Light (documentation, issues)
First occurred: 19:32:23 (1 occurrences)
Last logged: 19:32:23

Error adding entity None for domain light with platform govee
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 608, in _async_add_entities
await coro
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 825, in _async_add_entity
capabilities=entity.capability_attributes,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 1116, in capability_attributes
if LightEntityFeature.EFFECT in supported_features:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'int' is not iterable

@Clickfr
Copy link

Clickfr commented Jan 4, 2025

I don't think we need all of the "Me too" comments, unless you have something new to add. Please subscribe to the issue instead.

The Tapo integration has had this deprecation WARNING for ages now. I'm guessing this is the culprit?

WARNING (MainThread) [homeassistant.components.light] Entity None (<class 'custom_components.tapo.light.TapoLightEntity'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <LightEntityFeature: 0> and color modes, please create a bug report at https://github.com/petretiandrea/home-assistant-tapo-p100/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation

Yep, the Govee case would confirm your assumption.

@edgicat
Copy link

edgicat commented Jan 4, 2025

Can confirm same issue with HA Container 2025.1.0. Rolling HA back to 2024.12.0 does fix the issue.

FYI The Tapo HAC displays as version 3.1.2 & 3.1.4 in different menus, see images

IMG_20250104_195626
IMG_20250104_195607

djhworld added a commit to djhworld/home-assistant-tapo-p100 that referenced this issue Jan 4, 2025
@djhworld
Copy link

djhworld commented Jan 4, 2025

This seems to fix the issue for me, my light is working again, raised a PR #826

image

@edgicat
Copy link

edgicat commented Jan 4, 2025

This seems to fix the issue for me, my light is working again, raised a PR #826

image

Confirmed works for me
Screenshot_2025-01-04-23-36-43-38_c3a231c25ed346e59462e84656a70e50
Screenshot_2025-01-04-23-35-40-55_c3a231c25ed346e59462e84656a70e50

Interesting light brightness percentage glitch on HA Gui, I take it that's an HA issue

@boblemus
Copy link

boblemus commented Jan 4, 2025

@djhworld Sadly the control is completely disabled and cannot be toggled by me (everything same version as you, except L530 HW is 3.0 and FW is 1.1.9)

@edgicat
Copy link

edgicat commented Jan 5, 2025

@djhworld Sadly the control is completely disabled and cannot be toggled by me (everything same version as you, except L530 HW is 3.0 and FW is 1.1.9)

Hey boblemus,

Have you updated the python script and restarted HA, as per:
#826

If not you will need to wait for HACS component update to come through.

@boblemus
Copy link

boblemus commented Jan 5, 2025

@edgicat Ahh - I missed the part about modifying the Python script. Apparently that did the trick - thank you!!

@mcderd-coder
Copy link

Thank you, I made the change, it's now working fine again 👍

@bobfoyers
Copy link

Same issue with a L630 (firmware 1.1.2).

HA version 2025.1.0

@Av4K100
Copy link

Av4K100 commented Jan 5, 2025

Have implemented the change mentioned in PR 826 however with this change it seems to be affecting light groups in homeassistant, for example i have three bathroom lights combined into a bathroom lights group and after this change i can no longer group these lights together for them to work (the entity shows as unavailable, have deleted and readded and still the same). Rolling back the update and changes to light.py resolve the issue

@Av4K100
Copy link

Av4K100 commented Jan 5, 2025

Changing lines 54-56 in light.py to self._attr_supported_features = (LightEntityFeature.EFFECT) as mentioned by pgarciafc on PR #826 has fixed the light group and entity issues on L630 bulbs for myself

@djhworld
Copy link

djhworld commented Jan 5, 2025

@Av4K100 I've updated the PR with a similar change - does this fix the group issue?

@Adagis-MC
Copy link

@djhworld I've retested this on with my P100s in a group. The error still occurs.

@boblemus
Copy link

boblemus commented Jan 5, 2025 via email

@Av4K100
Copy link

Av4K100 commented Jan 5, 2025

@boblemus removing the if self._effects else () at the end of the code should allow the groups to work however as noted in PR #826 by pgarciafc there could be other issues, might be worth giving a try for yourself to see if that sorts the problem for you until there is a full fix implemented

djhworld added a commit to djhworld/home-assistant-tapo-p100 that referenced this issue Jan 5, 2025
@boblemus
Copy link

boblemus commented Jan 5, 2025

@boblemus removing the if self._effects else () at the end of the code should allow the groups to work however as noted in PR #826 by pgarciafc there could be other issues, might be worth giving a try for yourself to see if that sorts the problem for you until there is a full fix implemented

Can confirm. Removing "if self._effects else ()" made both generic and light groups work.

@djhworld
Copy link

djhworld commented Jan 5, 2025

Looks like we have a fix in #826 to return LightEntityFeature(0) instead of 0 which seems promising for both the ungrouped and grouped cases

@djhworld
Copy link

djhworld commented Jan 5, 2025

For reference looks like this issue was caused by this home-assistant/core#132371

@carvan
Copy link

carvan commented Jan 7, 2025

Just applied this fix:
image
But the light entity looks to be unavailable still:

image

Did I make something wrong?

@Adagis-MC
Copy link

@carvan. Yes.

The
else set()
should be
else LightEntityFeature(0)

as shown in theatest commit.

@carvan
Copy link

carvan commented Jan 7, 2025

@carvan. Yes.

The

else set()

should be

else LightEntityFeature(0)

as shown in theatest commit.

Oh ok that makes sense then. I honestly just copied it from the other post without even reading it assuming it was correct. Thank you

@dimitrispili
Copy link

Does anyone knows if Home Assistant Core 2025.1.2 version, solve the problem or we have to do it manually again?

@Lockie85
Copy link

I'm on latest everything and all seems good for me now.

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