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

v5.2.2 broke all my devices. Became unavailable. Reverted back to v5.2.1 #1772

Open
cloudbr34k84 opened this issue Aug 27, 2024 · 28 comments
Open
Labels
bug Something isn't working

Comments

@cloudbr34k84
Copy link

Sorry didn't have time to check or provice more info and other things as I needed access to some of those devices to use. Ill try again tomorrow and update again and see what errors are showing

@cloudbr34k84 cloudbr34k84 added the bug Something isn't working label Aug 27, 2024
@straybiker
Copy link

Same here, existing ones broke. Removing them and adding them again did not work either

@alawadhi3000
Copy link

Same here, but its not for all sensors, some of them still work.

@irresisti
Copy link

irresisti commented Aug 27, 2024

I got this error message now

2024-08-27 15:33:20.929 ERROR (MainThread) [homeassistant.components.light] Error while setting up localtuya platform for light Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform await asyncio.shield(awaitable) File "/config/custom_components/localtuya/common.py", line 96, in async_setup_entry entity_class( File "/config/custom_components/localtuya/light.py", line 170, in __init__ if self._config.get(CONF_SCENE) < 20: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: '<' not supported between instances of 'str' and 'int'

@ArnolddeBolster
Copy link

same here for all my light bulbs. my switches still work

@vivdesign
Copy link

Me to everything went offline had to restore backup

@GuidoTraversari
Copy link

GuidoTraversari commented Aug 27, 2024

i have the same problem.. after the update at LocalTuya 5.2.1, my my light bulbs stop to working. I have the same problem with one led strip. my switches still work!

2024-08-27 15:35:52.338 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities light.altalena, light.camino are missing or not currently available 2024-08-27 15:47:31.972 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities light.altalena, light.camino are missing or not currently available 2024-08-27 15:56:59.973 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities light.altalena, light.camino are missing or not currently available 2024-08-27 16:08:21.730 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities light.altalena, light.camino are missing or not currently available 2024-08-27 16:13:34.040 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities light.altalena are missing or not currently available 2024-08-27 16:13:34.727 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities light.altalena are missing or not currently available 2024-08-27 16:13:34.910 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities light.altalena are missing or not currently available 2024-08-27 16:13:35.128 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities light.altalena are missing or not currently available

@harjaj
Copy link

harjaj commented Aug 27, 2024

same here, my light unavailable ,if I want to use i have to change my light to switch

@mguyard
Copy link

mguyard commented Aug 27, 2024

Same for me for climate entity.
Rollback works

@ELERON23
Copy link

Protocol version 3.5 is not present after upgrade to 5.2.2, broke light buld support. Reverted back to 5.2.1 and protocol 3.5 is back.

@farnsy
Copy link

farnsy commented Aug 27, 2024

I'm getting the same error:
Error while setting up localtuya platform for light

however rollback to 5.2.1 didn't resolve it for me. UI showing 5.2.1 is running, logs still show same error. Have restarted HA and restarted server.

any tips welcome!

@JampireX
Copy link

JampireX commented Aug 28, 2024

All lights broken after update, reverting to 5.2.1 didn't helped.

Error while setting up localtuya platform for light
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/localtuya/common.py", line 96, in async_setup_entry
    entity_class(
  File "/config/custom_components/localtuya/light.py", line 156, in __init__
    self._max_mired = color_util.color_temperature_kelvin_to_mired(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/color.py", line 638, in color_temperature_kelvin_to_mired
    return math.floor(1000000 / kelvin_temperature)
                      ~~~~~~~~^~~~~~~~~~~~~~~~~~~~
TypeError: unsupported operand type(s) for /: 'int' and 'str'

Temporary fix:
#1774 (comment)

@GuidoTraversari
Copy link

I solved... Now i use tuya official integration and worked all device...

@cloudbr34k84
Copy link
Author

I solved... Now i use tuya official integration and worked all device...

what do you mean?

@titovskiy
Copy link

I solved... Now i use tuya official integration and worked all device...

What about local work without the Internet?

@GuidoTraversari
Copy link

I solved... Now i use tuya official integration and worked all device...

what do you mean?

it means that I stopped using localtuya and installed the Tuya integration... without having to re-pair anything, the official Tuya integration immediately recognized all my devices in an instant and now they work... it's true that in theory I lost the functionality in LAN, but at least everything works!

@titovskiy
Copy link

but at least everything works!

works on 5.2.1 too %) just roll back

@cloudbr34k84
Copy link
Author

I solved... Now i use tuya official integration and worked all device...

what do you mean?

it means that I stopped using localtuya and installed the Tuya integration... without having to re-pair anything, the official Tuya integration immediately recognized all my devices in an instant and now they work... it's true that in theory I lost the functionality in LAN, but at least everything works!

oh yeah, nah i need tuya local as tuya Integration does recognise all my devices or i need specific entities

@LoznOz
Copy link

LoznOz commented Aug 28, 2024

Lost (unavailable) all our light globes as well. No stress here - I’m heading overseas in 36 hours & family at home has no lights coming on 😓. I’ll try revert as others have done in comments above if I can figure out how to do that 🤞

CM707 added a commit to CM707/localtuya that referenced this issue Aug 28, 2024
@ImSkully
Copy link

ImSkully commented Aug 29, 2024

Anyone looking for a temporary (or better alternative) solution for LocalTuya in the meantime until this issue is fixed, you can use this fork instead: xZetsubou/hass-localtuya - I have been using a mix of both versions as some of my devices only function properly in the fork.

The steps to install it through HACS is the exact same and you do not have to uninstall the existing integration as it will simply be overwritten because both of these custom integrations are providing the same component. (Be warned: make a backup before you do this in case anything goes wrong, I can't be certain this works for everyone and for all possible devices)

  1. Add the fork repository in your HACS custom repositories list:

    • Repository: https://github.com/xZetsubou/hass-localtuya
    • Type: Integration
  2. Search for localtuya in HACS and install or use button below - the fork version of the localtuya integration appears in the HACS table with a 🔹 prefix on the description line

    Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

  3. Restart Home Assistant

  4. If your existing hub with your devices is still showing them as unavailable, simply add a new one by configuring localtuya again - it might be worthwhile to just completely start fresh by deleting all existing configurations in localtuya and setting up all your devices again as normal

Official docs for more info: https://xzetsubou.github.io/hass-localtuya/

@a-bianucci
Copy link

I am in the same boat - rolled back and it's back to working for now. Exact same error as above

@hantk8
Copy link

hantk8 commented Aug 29, 2024

same here, all device stopped working. Rolled back to 5.2.1

@fenty17
Copy link

fenty17 commented Aug 29, 2024

Roll back to 5.2.1 didn’t work for me. Only have four lights and trying to resubmit configuration for them doesn’t work either.

@alawadhi3000
Copy link

alawadhi3000 commented Aug 30, 2024

Roll back to 5.2.1 didn’t work for me. Only have four lights and trying to resubmit configuration for them doesn’t work either.

Restore from backup.

@wesleykirkland
Copy link

Even after restoring to 5.2.1 and even 5.2.0 none of my Tuya devices will come online. Restoring a full Home Assistant backup is pretty much out of the question given how long it's been broken for me. I back everything up to a Git Repo and I pulled down the entire folder and reuploaded it in custom_compents before it broke and still nothing :/

@Caligo82
Copy link

I wonder ... has there been any progress here? Did a cold reboot actually solve this for most people?

@JampireX
Copy link

I wonder ... has there been any progress here? Did a cold reboot actually solve this for most people?

I switched to a fork and it works perfect with no need to reset the settings.
https://github.com/xZetsubou/hass-localtuya

@irresisti
Copy link

irresisti commented Dec 1, 2024

I wonder ... has there been any progress here? Did a cold reboot actually solve this for most people?

I switched to a fork and it works perfect with no need to reset the settings. https://github.com/xZetsubou/hass-localtuya

I installed the other version and it now works perfectly again. Thanks for the tip

@JampireX
Copy link

JampireX commented Dec 2, 2024

I wonder ... has there been any progress here? Did a cold reboot actually solve this for most people?

I switched to a fork and it works perfect with no need to reset the settings. https://github.com/xZetsubou/hass-localtuya

I installed the other version and it now works perfectly again. Thanks for the tip

Add repository (link to github) in HACS and just update integration from it. The settings will be saved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests