Today, in a scene I wanted to configure a waiting time depending on the level of my tank and send myself a message informing me of that waiting time. The way the « Wait » action has evolved lets me do the calculation there, but I can’t do the same in « Send a message ». And even if it were possible, I’d be annoyed to have to write the same formula twice.
The solution, of course, is to define an MQTT device, then in the scene put my formula in a « Control a device » action, then use a « Retrieve the last state » action to use it in « Wait » and in « Send a message ».
But in reality, it’s tedious 
I would find it very convenient to have an action, perhaps named « Set a variable », to define a simple or calculated value, then retrieve it later in all actions that accept a variable.
It would look like this :
A few years ago @pierre-gilles wasn’t necessarily in favor, but Gladys has evolved a lot since then.
I agree with you that going through MQTT is cumbersome and remains « a bit of a hack ».
Given the number of people who have this need, I think it’s legitimate to ask the question again.
Another benefit of this feature is that it prevents a « variable » in MQTT from being used in multiple scenes and causing inconsistencies (because of a user error).
In some cases, it’s very handy to share data between scenes, but not always.
3 Likes
Ah? I don’t even remember 
I might have had my reasons at the time, but indeed the scenes have evolved a lot since then, it doesn’t bother me to have this action in the scenes!
2 Likes
Hello, has it become possible since then?
My goal would be to create a temperature difference, and depending on whether the result is positive or negative, I would take one action or another.
Hello, currently no — you need to create a permanent variable in the MQTT integration and you can use it in scenes!