I don’t know if this would be of great interest to you (but it means a lot to me ^^): would it be useful to be able to have date/time type values. Or even several types:
date
year
month
day
hour
minutes
timestamp
I can see the usefulness for me to manage the timing for turning some devices on/off.
For example, for my pool pump, I’d like to be able in Gladys (without using Node-RED, which sometimes requires knowledge I don’t have to create script snippets and functions) to create this kind of scene:
Trigger at 8:00 AM
Start filtration
Retrieve pool temperature
operation T° piscine / 2 > gives a value X (this gives me the required filtration duration in hours)
Convert this value to minutes if needed
Wait X minutes
Stop filtration
I imagine there are many other use cases, particularly for managing durations.
I’m 100% for it too!! I’m exactly in the same situation, or almost!!
My probe gives me an ideal daily filtration time that changes depending on the water temperature and the treatment (between 30 minutes per day and 3:00).
But on my side, that’s also linked to another feature request to be able to write values from scenes…
Hello, date handling is a good idea.
J’aimerais travailler sur le sujet, il se trouve que je suis également intéressé par des appareils pouvant stocker une date+heure (le timestamp seems the most suitable since it’s an integer type that can be easily saved), dans mon cas ce serait plutôt pour afficher des informations dans le dashboard (in x minutes, in y hours…)
Can you tell me what you think is missing in your use case? Because in the scenario you describe above and that I’m trying to picture, the only thing missing to me are timestamp devices.
Let me explain, in the example you give :
However, the « wait X minutes » could be replaced by « wait until such date at such time » (in your scene it’s now + 2h for example) then trigger a second turn-off scene when we reach the timestamp time. I suggest this because imagine Gladys restarts during these 2-3 hours of waiting — how do we resume the scene where it left off.
Of course we’ll need to add
a way to trigger a scene on timestamp devices (a bit like calendar events essentially)
a way to retrieve the current date and time in the « control a device » block
For the date/time manipulation part, we already have the ability to do calculations in scenes — wouldn’t that answer your request if we associate it with a timestamp device?
What do you think?
Shoot, I tried to be clear… I guess it’s not that clear in my head!
The thing is, when I see your proposal it seems very coherent to me, but where does this variable come from?
In my example, I want to retrieve a temperature, apply a basic mathematical calculation to it to: divide, convert a time value (hour / minute / etc…) and then use that value in the WAIT block.
I don’t know what that kind of thing would entail.
Maybe I need to look at it more broadly and what I need is just a CALCULATION block that takes a base value and transforms it into a variable that we use later?
Actually I wrote the message after checking… So there may be something I didn’t understand.
If we allow variable injection in the WAIT field, can the scenario I described be applied in the scenes?
EDIT : I misread your message so I’ll start again :
For me what’s intuitive is to retrieve a value, apply a calculation to it, and then use it.
In what you propose, we retrieve a value, and it’s when using it (in the WAIT block) that we’ll apply the calculation to it, am I right?