En tant qu’utilisateur
Je veux pouvoir additionner, soustraire, multiplier, diviser une variable de scene
Afin de pouvoir réaliser des calculs plus complexe dans les scenes
Très bonne idée, cela peut être intéressant dans pas mal de cas de figure !
Vous voulez dire ça ?
Je te propose de la modifier pour prendre ton cas de figure en compte aussi et fusionner les votes ![]()
Pi @lmilcent
Bon, bon, ok je vous donne mon vote 
En tout cas c’est bien mon besoin, faire des calculs sur les données récupérée dans les scènes !
Haha 
On pourrait faire des fusions oui parce que certain voulait ça aussi ^^
Ta PR demande pas mal de trucs, par exemple « moyenne de valeurs sur une période », ce qui est un dev costaud.
C’est pas du tout ce dont on parle ici ^^
Ici, on parle juste de prendre une valeur de capteur qu’on a déjà dans la scène, et de faire +1, x2, -4, /5.
Ta PR est toujours d’actualité du coup ?
Je vois. En effet, il faut bien déterminer les deux demandes de fonctionnalité du coup !
Les deux sont mes besoins, mais surtout ce qui n’est pas dans le périmètre de cette demande là 
C’est pour ça que les demandes de fonctionnalités doivent être très concrètes, et lister exactement ce qui est attendu
Sinon :
- Personne ne vote pour car la demande n’est pas comprise
- Même moi je ne comprend pas ce qu’il faut développer

I’m bumping this thread to share my view on the matter; maybe concrete examples can guide people.
My use (at least the first for now) would be for the operation of my swimming pool.
Currently I control the pump’s start/stop from a scene that is defined with fixed schedules.
However, it is recommended to set a pump’s running time according to the water temperature. If I simplify, you have to divide the temperature by 2 to know how many hours the pump should run per day. This prevents the water from turning green if it doesn’t run enough / saves money if you avoid it running for no reason!
Being able to perform calculations is an important starting point for this use. Because if the water temperature drops quickly / rises quickly, I don’t want to modify my scene constantly, it would adjust itself.
For me Gladys can only move in the right direction by giving concrete examples of the needs!
You did very well ![]()
I’m wondering whether, in the meantime, there might exist an online API allowing you to perform a calculation and return the result?
Gladys being able to make API calls, that would almost allow doing without the functionality while it’s being developed.
[EDIT]
Well yes it exists:
I’ll have to look into that one of these days ![]()
Warning, Gladys cannot make GET API calls with arguments coming from sensors. But fortunately, there is a POST API and Gladys can then use dynamic arguments!
[EDIT]
@pierre-gilles: could this be a bug?
The sensor values are sent with the braces { (visible in the screenshot on the right).
The value is not substituted in the screenshot on the right ![]()
Indeed, that’s a bug! Do you have what you need to reproduce the bug so you can open a GitHub issue?
Yes, I’ll do that for you.
[EDIT]
To me, your problem is normal according to the explanation below if you try it
And the body, apart from the variables, is not written correctly.
However, I haven’t tried with variables but only with values; I get the result but I get an error message
I’ll try later with variables when I’m at home.
But yes, of course, luckily I didn’t read it…
But the problem is that you can’t really know which variable to use later in the rest of the scene.
Replace your variable with a value that you’re supposed to have to know the result.
When you have the answer you can replace it back with your variable.



