To create a resolved promise, you don't need to call *defer* and then *resolve* the deferred object. Simply call *Promise.resolve* with the value, and it'll return a resolved promise with that value, i.e.:

```javascript
  listDevices: function() {
    let buf = [];
    for (let dev in devices) {
      buf.push([dev, devices[dev]]);
    }
    return Promise.resolve(buf);
  },
```