-
Notifications
You must be signed in to change notification settings - Fork 58
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
TypeError: object of type 'NoneType' has no len() #114
Comments
I've been poking at this for about 2 hours, trying to understand what was wrong, and the light just started working again. I'm starting to suspect I have this device configured incorrectly, so maybe this is more of a "question" than a bug. The tuyadebug package completely fails to connect to the device (I've closed all connections, but it just doesn't work)
tinytuya works, and does give a list of DPs:
I have it configured like so in localtuya (from .storage/core.config_entries):
This light has two individually controllable lights. One "main light" that is color_temp only, and one "auxiliary light" that is essentially an LED Strip. By default localtuya configures this as one light entity but then I can't properly control the light. With my custom configuration I get two light entities, one for the color_temp light, and another for the RGB light, and can control them correctly. I suspect the device is getting into a weird state and that's why it stopped working, my poking at it/debugging got it out of that state and things started working again. Any insights would be much appreciated, I suspect I need to change my configuration. |
This is probably because you're using the upstream tuyadebug, try this fork package.
You seemed you aren't using cloud set-up with localtuya that's I'm guessing DPs codes not showing up. |
Hi, thanks for responding. The forked version of tuyadebug does the same thing, no response after 2 attempts. It was the white (color temperature only) light I was trying to use. That's correct, I'm not using the auto-setup. If I do, it creates one entity using DP 20 which in this case is an odd entity that only controls the last light that was used. Meaning you can't use it to control both/either light. A little further investigation: before the light went into an odd state, my spouse was the color (auxiliary) light, it's an individually addressable LED strip around the base of the light. It was set to use a scene set from the app that was multiple colors in motion... Feels like there's a hint there. Again, I'm becoming more and more certain I have the configuration wrong. |
Can you post your entry diagnostics |
Thanks, btw, you haven't told which of the entities when turn it on it raises the error is it both? I'm quite confused here because the logs error lines doesn't match the latest version of this fork not sure if the error. which seems it's outdated, can you re-check if this issue shows in 3.2.4 and post new logs. |
Quoting myself from above:
OK... I have 3.2.4 installed, I guess I could have HACS redownload? Not sure what's not matching in the logs, this line is throwing the error. This is the manifest.json I've got:
|
Sorry, it seems my local "light.py" module is modified. I don't know why it return false when it check if it's white mode or not unless DP 21 mode changed to hass-localtuya/custom_components/localtuya/light.py Lines 340 to 343 in 4afac6c
This is my guessing you specified a If my guess is right then turning the light with this, will works. service: light.turn_on
data:
color_temp: 407
target:
entity_id: light.kamzai_smart_bulb |
The problem
Just upgraded to 2024.1.5 from 2023.12.1 and started seeing these errors when attempting to turn on a light:
Environment
Steps to reproduce
DP dump
Provide Home Assistant traceback/logs
Additional information
The text was updated successfully, but these errors were encountered: