Where does this MyDeviceAPI class in the Discovery example come from?

I’m making my first steps in Homey device development and followed the Getting started tutorial. All was going fine until I used the device.js code snippet for onDiscoveryAvailable on the Discovery page (Discovery - Homey Apps SDK):

async onDiscoveryAvailable(discoveryResult) {
// This method will be executed once when the device has been found (onDiscoveryResult returned true)
this.api = new MyDeviceAPI(discoveryResult.address);
await this.api.connect(); // When this throws, the device will become unavailable.
}

During execution, I get a reference error on the line instantiating a new MyDeviceAPI object. Where should this MyDeviceAPI class be defined and implemented? I can’t find it in the code generated by “homey app create”.

Best regards,
Patrick.

It’s just an example on how you could pass the discovery result to a custom class that implements access to your device’s API. In other words, “INSERT YOUR OWN DEVICE IMPLEMENTATION HERE”.

Ok, thanks. Then I’ll just remove all the api stuff.