Creating a selector


I need help. I have to have to buttons on an Ipad screen that increase and decrease the value in a label and have an other button that active a command that use variables in label to send a command in http post protocol. I tried with rules but I have a problem. I can’t find a way to read the value to increase or decrease when I use execute to change it. The sensor that trigger the rule is not the one that have this value.
don’t know if it is possible.

Your help is appreciated.

Does it have to be buttons?

Could you not use a slider instead?

(I'm assuming the value is a number, or are you selecting different text options?)

For what I do, buttons would be the best and If I use a slider how can I read the slider if my rule activated by a button can just access the value of the sensor that it triggered? I need to find a way to share variables between rules. I found global variables but I understood that I can’t write on it. I found insert() but I don’t understand how I can read a inserted value.

The value is a number, yes.

I am new at rules.

Thanks for helping me.


It was just a suggestion, as a rules based version will be a bit long winded.

I use "in memory" commands to store almost anything, monitor the values and process all kinds of things.

So in theory...

You'd need an in-memory command and sensor to set, store and recall your value

Another 3 to trigger increases, decreases and an action.

(A status command to monitor, an ON command to use on your button, and you can use the same ON command in a rule, but assign it an OFF state. ExecuteCommand"button_pressed","OFF" )

Then you'd need 3 rules to do the following...

(Probably each with a debounce timer of ~300ms)

Increase button & value = turn off increase button and increase value

Decrease button & value = turn off decrease button and decrease value

Action button & value = turn off action button and send value somewhere.

There are plenty of topics on this forum about all these subjects.

A good hunt around will find you what you need.

I'm away until Monday now, so if you are still stuck next week, I'll try to hash something together for you.

Unless one of the real rules magicians steps in and offers some more accurate help.

Good luck