diff --git a/homeassistant/components/device_tracker/ubus.py b/homeassistant/components/device_tracker/ubus.py index cac4b7769e3..9ccc61dffc9 100644 --- a/homeassistant/components/device_tracker/ubus.py +++ b/homeassistant/components/device_tracker/ubus.py @@ -80,7 +80,7 @@ class UbusDeviceScanner(DeviceScanner): return self.last_results @_refresh_on_acccess_denied - def get_device_name(self, device): + def get_device_name(self, mac): """Return the name of the given device or None if we don't know.""" if self.leasefile is None: result = _req_json_rpc( @@ -105,10 +105,9 @@ class UbusDeviceScanner(DeviceScanner): # Error, handled in the _req_json_rpc return - return self.mac2name.get(device.upper(), None) + return self.mac2name.get(mac.upper(), None) @_refresh_on_acccess_denied - @Throttle(MIN_TIME_BETWEEN_SCANS) def _update_info(self): """Ensure the information from the Luci router is up to date.