Hello,
To make a kind of sheduler I want to compare the %systime% to a time stored in a dummy variable or mqtt helper.
Dummy#var1 = 11 ( 11 o-clock)
Dummy#var2 = 30 ( 30 minuts)
This is simple to write over mqtt from a controller.
rule line should be :
if %systime% > 11:30 ....
Can i transform 11:30 in seconds with : let,1, [Dummy#var1]*3600+[Dummy#var2]*60
and make rule
i f %systime% > [var#1]
Thanks in advance for your advices
Patou
Compare systime with hours / minuts stored in dummy var
Moderators: grovkillen, Stuntteam, TD-er
Re: Compare systime with hours / minuts stored in dummy var
How is your time stored ? if you transform everything in seconds like
if (%syshour%*3600+%sysmin%*60+%syssec%) > [var#1]
Won't that work ?
Also you came with a solution proposal, not your issue. If you describe your objectives we may help you better.
Cheers !
if (%syshour%*3600+%sysmin%*60+%syssec%) > [var#1]
Won't that work ?
Also you came with a solution proposal, not your issue. If you describe your objectives we may help you better.
Cheers !
Re: Compare systime with hours / minuts stored in dummy var
Depends on what you want to do.
Do you want to change something at some time, then you can just act on that time.
If you also want to set some value at reboot, then you indeed must compare like described by Grumpf.
Do you want to change something at some time, then you can just act on that time.
If you also want to set some value at reboot, then you indeed must compare like described by Grumpf.
Who is online
Users browsing this forum: Google [Bot] and 43 guests