Homey Community Forum

Trigger flow from homeyscript isn't working

Hi
I’m trying to trigger a flow from homeyscript with this script:
################################################
// my script

//console.log(lFlows);

Homey.flow.triggerFlow({id: ‘731c8b42-a7db-4fa9-be07-9ca457ed2059’});

return(true)

#####################################################

I do not get any error messages, but nothing happens.
If I run the same line in Homey developer the flow is triggered and everything works fine.
Any ideas?

HomeyScript doesn’t have full permissions, whereas the developer console has (the logic of which escapes me).

If you want to see the error, you need to use await so your script will wait for the execution of the method call to finish:

await Homey.flow.triggerFlow({ id: '731c8b42-a7db-4fa9-be07-9ca457ed2059' });

Thanks, then I’ll go through setting a variable that a flow listens to, instead.

1 Like