Telldus API - async

Hi!

I'm using https://github.com/mifi/telldus-api to control my Nexa/Telldus units with Node Red.
Now I would like to read sensor data with the same library but are struggling with getting the data from a async function in the function node and return it in the payload.

The code below (placed in a function node), will only return a "[object Promise]" in the payload.

const { LiveApi } = global.get('telldusModule');

const api = new LiveApi({
key: 'xxx', // publicKey
secret: 'xxx', // privateKey
tokenKey: 'xxx', // token
tokenSecret: 'xxx', // tokenSecret
});

var data = api.getSensorInfo(12345678);

msg.payload = data;

return msg;

The call is asynchronous and returns a promise so you need to await for that to complete before you return the answer... see their readme page for an example.