fbradyirl / openwrt-luci-rpc

Other
34 stars 22 forks source link

Incorrect number of arguments in get_all_connected_devices #36

Closed qypea closed 4 years ago

qypea commented 4 years ago

Description

When called from homeassistant I get an exception, and fail to get my luci status. On line 166 the get_all_connected_devices calls itself but doesn't provide the two required options.

What I Did

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/device_tracker/setup.py", line 163, in async_device_tracker_scan
    found_devices = await scanner.async_scan_devices()
  File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 495, in async_scan_devices
    return await self.hass.async_add_job(self.scan_devices)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/luci/device_tracker.py", line 63, in scan_devices
    self._update_info()
  File "/usr/src/homeassistant/homeassistant/components/luci/device_tracker.py", line 91, in _update_info
    result = self.router.get_all_connected_devices(only_reachable=True)
  File "/usr/local/lib/python3.7/site-packages/openwrt_luci_rpc/__init__.py", line 43, in get_all_connected_devices
    only_reachable=only_reachable, wlan_interfaces=wlan_interfaces)
  File "/usr/local/lib/python3.7/site-packages/openwrt_luci_rpc/openwrt_luci_rpc.py", line 166, in get_all_connected_devices
    return self.get_all_connected_devices()
TypeError: get_all_connected_devices() missing 2 required positional arguments: 'only_reachable' and 'wlan_interfaces'