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 loading integration when wifi does not have a network entry from ubus #44

Open
dmickeyus opened this issue Dec 30, 2024 · 0 comments

Comments

@dmickeyus
Copy link

I have a mesh where does not have an entry of 'network' from ubus caused HA won't load the integration.

Log reported from HA:

2024-12-29 22:33:12.180 ERROR (MainThread) [custom_components.openwrt.coordinator] Device [xxx] async_update_data error: 'network'
Traceback (most recent call last):
File "/config/custom_components/openwrt/coordinator.py", line 333, in async_update_data
wireless_config = await self.discover_wireless()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/openwrt/coordinator.py", line 63, in discover_wireless
network=iface['config']['network'][0])
~~~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'network'


I tried to remove the network entity from the dict on line 63 and temporarily fxied.

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

1 participant