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

Failed to unload - reload config entry #1949

Closed
iotinkognito opened this issue May 26, 2024 · 3 comments
Closed

Failed to unload - reload config entry #1949

iotinkognito opened this issue May 26, 2024 · 3 comments

Comments

@iotinkognito
Copy link
Contributor

Describe the bug
My devices are unresponsive when looking at the integration I see the message after reload config entry.

To Reproduce
Services -> core integration reload

Expected behavior
Reload the tuya local integration

Additional context
If devices on ubiquiti networks are physically switched off they don’t become controllable with tuyalocal after being switched back on even with static ipaddress. I was running an integration reload on interval to overcome the problem.

Log Error information
After running code integration reload.

Logger: homeassistant.components.number
Source: helpers/entity_platform.py:910
integration: Number (documentation, issues)
First occurred: 6:01:44 AM (2 occurrences)
Last logged: 6:01:44 AM

Error while removing entity number.dl_pantry_local_timer
Error while removing entity number.locdl_wir_jowo_timer
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1378, in async_remove
await self.__async_remove_impl(force_remove)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1394, in __async_remove_impl
await self.async_will_remove_from_hass()
File "/config/custom_components/tuya_local/helpers/mixin.py", line 111, in async_will_remove_from_hass
await self._device.async_unregister_entity(self)
File "/config/custom_components/tuya_local/device.py", line 195, in async_unregister_entity
await self.async_stop()
File "/config/custom_components/tuya_local/device.py", line 170, in async_stop
await self._refresh_task
TypeError: object Future can't be used in 'await' expression

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 910, in async_reset
await entity.async_remove()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1383, in async_remove
self.__remove_future.set_result(None)
asyncio.exceptions.InvalidStateError: invalid state

Logger: homeassistant.config_entries
Source: config_entries.py:792
First occurred: 6:01:44 AM (2 occurrences)
Last logged: 6:01:44 AM

Error unloading entry DL Pantry LOCAL for tuya_local
Error unloading entry locDL WIR JOWO for tuya_local
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 792, in async_unload
result = await component.async_unload_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/tuya_local/init.py", line 517, in async_unload_entry
await async_delete_device(hass, config)
File "/config/custom_components/tuya_local/device.py", line 655, in async_delete_device
await hass.data[DOMAIN][device_id]["device"].async_stop()
File "/config/custom_components/tuya_local/device.py", line 170, in async_stop
await self._refresh_task
TypeError: object Future can't be used in 'await' expression

@iotinkognito iotinkognito added the bug Something isn't working label May 26, 2024
@make-all
Copy link
Owner

Your line numbers are off-by-one compared with latest code. I think this is an indication that you are using an older version, and this is therefore a duplicate of #1888

@make-all make-all closed this as not planned Won't fix, can't repro, duplicate, stale May 26, 2024
@make-all make-all removed the bug Something isn't working label May 26, 2024
@iotinkognito
Copy link
Contributor Author

Running latest?

Home Assistant

Core
2024.5.5
Supervisor
2024.05.1
Operating System
12.2
Frontend
20240501.1

@make-all
Copy link
Owner

make-all commented May 29, 2024

What does the version say here?: https://my.home-assistant.io/redirect/integration/?domain=tuya_local
(or http://homeassistant.local:8123/config/integrations/integration/tuya_local if you do not trust my.home-assistant.io, replacing the http://homeassistant.local:8123 if your URL is different)

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

No branches or pull requests

2 participants