[APP][Pro] Temporary Variables

Temporary Variables

Temporary variables that only exist for the duration that the flow runs.
Advanced Flows only :slight_smile:

Flow Cards

  • Calculate floats (e.g. 10.457)
  • Calculate numbers (e.g. 10, automatically rounds up or down)
  • Simple number
  • Simple string
  • Simple boolean

Links

Feedback / Bugs

Any requests please post them in the Temporary Variables topic on the Athom Community forum
Please report issues at the issues section on Github otherwise in this topic.

Would you like to buy me a coffee :coffee: or a beer? :beer:

Feel free to donate to me for my work :slight_smile: It’s highly appreciated!

Check out my other apps

Changelog

v1.0.0

  • Initial release
2 Likes

The link on the app store “Bezoek forum” is not correct.
It is linking to the Telegram page of the community.
But the app Temporary Variables looks nice.

Yeah, have to change that later. I didnt want to create the thread before the release

OK, no problem.
I understand.

Maybe i am missing something, buth these are just tags, not variables: how can i change/update a variable and than reuse the first token but get the latest value?
Is this possible with this app?

That at least is what i and many more others need: in-flow variables.

But unless i am missing something, this just looks (mostly) like the buildin create a text/number/yesno tag.

1 Like

There are multiple places where in-flow-variables are discussed or “requested”:

A, i see you response there :wink:

1 Like

Not with this version, I could create a system for that. But you would have a new token everytime the variable changes. I can‘t think about a system that would currently allow to change a tag value after it was created. maybe i‘m missing something in the sdk, i‘ll take a look once I have some free time.

Yeah, i know, i have been banging my head on it also, allready tried it a couple of ways.
But without a currentRunningFlowId it would need at least 2 flowcards to use and you would need the user to fill in the uniqueId-tag to retrieve the unique in-flow-value.
So not very user friendly.
But since the buildin (general) variables just requires one flowcard to set and no flow card to use, it is, at least for me, still the easier way (except that it is not scoped).

Yes and then u have global variables again in a another name.

I mainly created the app for me to have a simple math card that doesnt require a text to int parse.

1 Like

Would be very useful if you could add (better) support for multiple variables. Currently if you have multiple variables of the same type they all show up with the same name, so it is hard to identify them from each other. Maybe add a field the THEN card where you can name the variable?

It would also be great if you could add an optional “with decimal points” field to the float variable THEN card. It would give us better flexibility. Sometimes I have to reduce decimals to 1 before I for instance send it to a device. Would be nice if this was possible to do at the same time as the number was created.

Sadly, the Homey SDK does not support dynamic token naming. Unfortunately, they had to have pre-defined.

You mean a way to round a number to a decimal? e.g. 0.0006 to 0.001

Hey wow, I was already looking for something like this!
I expected this to be integrated in homey by default but wasn’t.
Great job!

Being a newbie with Homey, I need some help to properly use your App.

I have created a text variable “Scenes” which contains the following string :
Rest,#ffa028,Relax,#ffb854,Read,,Concentrate,#ffe8c0,Energize,#fffefd,Cool bright,#ffe3b5,Bright,#ffc875,Dimmed,#ffc671,Nightlight,#ff6c0ff

For testing purpose, I take the 2nd element of that string to put in a temporary variable, using the formula {{ (‘Scenes’.split(‘,’)[2]) }}

image

But for some reasons, double quotes are added to the value

image

And due to these quotes, my next card, assumed to get a, RGB code via the temporary string, fails:

image

image

Any idea what I am doing wrong ? I guess it’s due to the formula (split) as I don’t get extra quotes when I use a simple text variable instead of a formula *…

V.

[*]. I did try with a json in my variable Scenes instead of an “array”, and with a simple logic card to get the 2nd element, assigning next the result into a temporary text variable. Then, I get a value without double quotes:

{"scenes":[{"name":"Rest","rgb":"#ffa028"},{"name":"Relax","rgb":"#ffb854"},{"name":"Read","rgb":"#ffcd80"},{"name":"Concentrate","rgb":"#ffe8c0"},{"name":"Energize","rgb":"#fffefd"},{"name":"Cool rgbght","rgb":"#ffe3b5"},{"name":"rgbght","rgb":"#ffc875"},{"name":"Dimmed","rgb":"#ffc671"},{"name":"Nightlight","rgb":"#ff6c0ff"}]}

That’s Homey side. I don’t modify the string at all. Use for this HomeyScript

Thx for the feedback. I will keep my alternative for the moment as, being a newbie, I still need to deep dive the HomeyScript.