Skip to content

Commit

Permalink
Merge pull request #31 from jabdoa2/patch-1
Browse files Browse the repository at this point in the history
Fix crash when wifi interface is down
  • Loading branch information
kvj authored Nov 23, 2024
2 parents 7c1f4c1 + 8072103 commit 856fbc5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions custom_components/openwrt/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ async def discover_wireless(self) -> dict:
if item.get('disabled', False):
continue
for iface in item['interfaces']:
if 'ifname' not in iface:
continue
conf = dict(ifname=iface['ifname'],
network=iface['config']['network'][0])
if iface['config']['mode'] == 'ap':
Expand Down

0 comments on commit 856fbc5

Please sign in to comment.