Variable not totally updated

Hello

I ask me a question (Homey pro 2023), I developped small homey script using global variable. It’s works, the variable is correctly updated but I don’t understand why values are not update inside the homey interface ?

Exemple: I use 4 global variables. If I log all values, I can found good values:

image

But if I display them by homey, variable values stay same as initial values:

image

Same thing inside the chart:

Did I forget something?

Global variables are not the same as System variables.
Global variables are created by HomeyScript, System variables you create in f.i. web app-flows editor like the ones you show here above.

example HomeyScript create globalvariable:

// Create Tags

log('Creating My String...');

await tag('My String', 'abcdef');

Oh thx a lot ! I will fix that :smiley:

1 Like

So what is a difference between

  • global.set(‘My String’, ‘abcdef’);

and

  • await tag(‘My String’, ‘abcdef’);

Other question, It’s possible to edit System variable from homeyScript ?

search for “script” brougt me to:

this guy nows it all!

1 Like

Global = for (all) HomeyScript scipts
Tag = Homey Tags/Tokens to be used in flows.

Yes it is possible to change Logic variables with HomeyScript, there is already some topics about it on the forum somewhere.
Found 1, not the one I first was thinking of, but has the same end results with the correct API points:

1 Like