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

can't reload/reconfigure from HA integration #66

Open
ClockeNessMnstr opened this issue Oct 4, 2024 · 1 comment
Open

can't reload/reconfigure from HA integration #66

ClockeNessMnstr opened this issue Oct 4, 2024 · 1 comment

Comments

@ClockeNessMnstr
Copy link
Contributor

Getting an error trying to use "reconfigure" to reset cloud connection.

Logger: homeassistant.config_entries
Source: config_entries.py:809
First occurred: 2:28:08 PM (1 occurrences)
Last logged: 2:28:08 PM

Error unloading entry Luba-VS734GNY for mammotion
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 809, in async_unload
result = await component.async_unload_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/mammotion/init.py", line 82, in async_unload_entry
await entry.runtime_data.manager.remove_device(entry.runtime_data.device_name)
File "/usr/local/lib/python3.12/site-packages/pymammotion/mammotion/devices/mammotion.py", line 253, in remove_device
await self.devices.remove_device(name)
File "/usr/local/lib/python3.12/site-packages/pymammotion/mammotion/devices/mammotion.py", line 130, in remove_device
await device_for_removal.cloud().stop()
File "/usr/local/lib/python3.12/site-packages/pymammotion/mammotion/devices/mammotion_cloud.py", line 195, in stop
self._mqtt.on_ready_event.remove_subscribers(self.on_ready)
File "/usr/local/lib/python3.12/site-packages/pymammotion/event/event.py", line 69, in remove_subscribers
self.on_data_event -= obj_method
File "/usr/local/lib/python3.12/site-packages/pymammotion/event/event.py", line 14, in isub
self.__eventhandlers.remove(handler)
ValueError: list.remove(x): x not in list

Had a similar error before with "reload" saying remove was never awaited. But this one looks more informative.

@mikey0000
Copy link
Owner

Thanks for that, I'll sort that out.

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