Être capable d'injecter une variable dans requête HTTP + contrôler un appareil

Hi, I was wondering how you’d picture it when you imagine a possible different block to control a device with a variable.

I tried something by reusing the component that already existed for inserting variables. If the value is a number, we save the new value in value as usual; otherwise it is saved as a string. In my trial I added a database field evaluate_value. Since we also have a request to do calculations on variables I thought that would allow doing both.

When the scene runs, if we encounter evaluate_value fields as the value of « control a device » actions, we replace the variables with their values and run the calculation (I was thinking of using the simple-evaluate package).

On the validation side I added on the evaluate_value field a @hapi/joi validation with a regex allowing only numbers, operators and {{variables}} (a complete formula — if the user enters "{{variable…}} + " without a second value it won’t save).

What do you think? What was your vision for how it should work?