Homey Community Forum

HomeyScript started from flow does not use up to date data?

I have a simple script to post data about various things to a node-red dashboard, among them the status of my dish washer.

Basically;
let washer = await Homey.devices.getDevice({id: ‘b74674ee-094b-4941-b193-55bd17191670’});
let doorOpen = washer.capabilitiesObj.alarm_contact.value;
let remainingTime = washer.capabilitiesObj[‘bshc_string.remaining_time’].value;
let progress = washer.capabilitiesObj[‘bshc_string.progress’].value;
And then I use fetch to post it.

This works like a charm from the script editor, but then I have created a flow that is triggered every minute to execute the script and push the data. The problem is though, that every time it is executed from the flow, the last values from when I executed it manually in the editor is sent and not the current values.

Have I missed something?

1 Like

That did seem to do the trick! Bad search skills from my side it seems :slight_smile: