Homey Community Forum

Homeyscript functionality

I’m struggling regularly with the shortcomings of the homey flows. For instance the lack of nested if or elsif functionality has driven me to several workarounds.
Also not being to control float and integer has driven me nuts.
Now I understood that Homeyscript should solve that and I am trying to understand how it works. Is for instance the below assumption true?
I can have a flow triggered by an event(eg variable changing or a time) then execute a script in which I have access to all variables and device parameters which are also available in Homey Flow. Use these in if then else statements and write values to it like in Homey flow

AFAIK you don’t have access to variables, unless you pass them as argument to the Homeyscript. Getting device capability values is possible, not sure if you can set them though.

Sure you can :slight_smile:

let flowTokens = await Homey.flowToken.getFlowTokens();

let variables = await Homey.logic.getVariables();


Nice, thanks for the correction :smiley:

1 Like

Nice indeed. I’m going to play around with it.
Thanks a lot.