Access other device from my app

I’ve had a HomeyScript, but it’s too limited, so I’m transferring the functionality into an app.

In HomeyScript I have this function:
async function getCurrentPower() {

const device = await Homey.devices.getDevice({ id: DEVICE_PULSE });

return device.capabilitiesObj[‘measure_power’].value;

}

Where DEVICE_PULSE is a device that I’ve downloaded from the Homey App Store that reads my electricity consumption.

Now I want to do the same from my app, and I don’t think the DEVICE_PULSE exposes any WebAPI.

How do I do this? It’s so easy from HomeyScript, and I had hoped it would be possible to do from the app.

You need to use the Web API (specifically the “In-app” feature).