localtuya icon indicating copy to clipboard operation
localtuya copied to clipboard

Issues removing dead bulb

Open aidzer0 opened this issue 2 years ago • 8 comments

Hello, recently I had a bulb die on me, I have been trying to remove it from HA with 0 success.

I have tried deleting the device through LocalTuya integration (Integrations > Configure > Edit device > Uncheck to delete device) thats when the error I pasted below shows. There are also log entries regarding LocalTuya not being able to connect to the bulb which is obvious since its dead.

I have also tried through HA (Devices and Services > navigate to the bulb > 3 dots > Delete)

I also tried to modify the .storage registry but I bombed my HA instance, I would prefer not to use that method again... (Thankfully I backup HA to my Google drive so recovery was an option)

Please help, I actually had a different bulb die and I was able to remove it no problem, this one on the other hand is being stubborn. Thanks!

LocalTuya Version: 4.1.0 HA version: 2022.9.7 Hacs version: 1.27.2

What the HA logs show:

Source: custom_components/localtuya/config_flow.py:247
Integration: LocalTuya ([documentation](https://github.com/rospogrigio/localtuya/), [issues](https://github.com/rospogrigio/localtuya/issues))
First occurred: 09:24:31 (1 occurrences)
Last logged: 09:24:31

Unexpected exception
Traceback (most recent call last):
  File "/config/custom_components/localtuya/config_flow.py", line 580, in async_step_configure_device
    self.dps_strings = await validate_input(self.hass, user_input)
  File "/config/custom_components/localtuya/config_flow.py", line 247, in validate_input
    data[CONF_DEVICE_ID],
KeyError: 'device_id'

aidzer0 avatar Oct 02 '22 14:10 aidzer0

I just ran into the same issue trying to remove a dead smart plug

nvx avatar Oct 04 '22 01:10 nvx

https://github.com/rospogrigio/localtuya/issues/871#issuecomment-1156923434

Deleting via the three dots worked for me. Looks like it's just the config flow way that's broken.

nvx avatar Oct 04 '22 04:10 nvx

If I do it that way, I deletes the entity and as soon as I refresh the webpage, the bulb comes back.

aidzer0 avatar Oct 04 '22 11:10 aidzer0

Also encountering this, it seems most editing does not actually persist, like unchecking a dps does not remove it, and changing the csv for dps, while the csv persists, does not trigger the prompts to configure them.

AntoineGS avatar Oct 04 '22 23:10 AntoineGS

Same thing. And when I removed using Delete from the three dots, I am now getting a "Connection to device succeeded but no datapoints found, please try again. Create a new issue and include debug logs if problem persists." error message when I try to add the device again. It actually came with all the options filled on the add form, secrets and IDs.

Home Assistant 2022.9.7 Frontend 20220907.2 - latest

mizifih avatar Oct 06 '22 17:10 mizifih

Settings > Devices and services > Localtuya. Click on 1_Device inside the integration box.
Click on the pencil top right of the screen. Disable the device. Update

Beside Download Diagnostics click on the vertical ... Delete the device.

grrraham avatar Oct 13 '22 03:10 grrraham

Settings > Devices and services > Localtuya. Click on 1_Device inside the integration box. Click on the pencil top right of the screen. Disable the device. Update

Beside Download Diagnostics click on the vertical ... Delete the device.

This worked!

Thank you so much! How did you figure that one out? Just Tried different options?

aidzer0 avatar Oct 13 '22 12:10 aidzer0

You are welcome :)

Home assistant likes to put (hide) important menus / options top right. Half the time when I cant immediately do something, its because I haven't explored options top right.

grrraham avatar Oct 13 '22 21:10 grrraham

Hmm I don't see the dots :(

neuronflow avatar Nov 05 '22 08:11 neuronflow

after disabling and reenabling and restarting HA the dots became visible! oO

neuronflow avatar Nov 05 '22 10:11 neuronflow