Homeyscript functionality

You will have to select the token uri and id like this:

  await Homey.flowToken.getFlowTokens().then(function(tokens) {
    for (let token in tokens) {
      if ( tokens[token].uri == "homey:manager:weather" && tokens[token].id == "state"  ) {
        var mytoken = tokens[token].value;
        console.log(mytoken);
      }
    }
  }).catch(console.error);
2 Likes