Homeyscript - enhancements to the api for advanced flows

Hi, I don’t get any AF flows with the standard function:

const flows = await Homey.flow.getFlows();

Can someone confirm this, please?

Maybe the api has changed a little bit with AF.

Correct,

1 Like

Thank you!

Hi @Dijker, one more question, please:

Homey.flow.getAdvancedFlows() and extracting the flow ids work now.
But I got the following error with triggering an advanced flow.
Any idea what could cause the problem?

Same here:

Just published a new version that fixed this HomeyScript App voor Homey | Homey

1 Like

THX!

Please could you tell us how it is possible to call a flow with a variable in homeyscript. Like the new flow cards.

const result = await Homey.flow.runFlowCardAction({
  uri: 'homey:manager:flow',
  id: 'programmatic_trigger_string_tag',
  args: {
    flow: {
      type: 'advanced',
      id: '6f28af21-2b4e-40f8-91e6-e56681c31a7d'
    },
    string: 'myvalue'
  }
});

console.log(result);
1 Like

Thanks Jero!

Hi Jero, I have got a nice change request:

Please make the edit window of inline scripts resizeable. At the moment it feels like editing in a porthole :wink:

THX

2 Likes

I agree just need to convince someone else :wink:

3 Likes

Works like charm :slight_smile:

How can I find out the properties of the flow object in the args in general by myself?

I mean getFlowCardActions shows the flow property itself and that I need the target flow id is clear. But how had I been able to find out the type property?

THX for your time!

Only way to find that one out is to actualy create a Flow that has the card filled in and check the JSON of that Flow to see what it looks like/accepts.