Compare systime with hours / minuts stored in dummy var

Moderators: grovkillen, TD-er, Stuntteam

Post Reply
Message
Author
Patou
Normal user
Posts: 54
Joined: 21 May 2018, 10:33

Compare systime with hours / minuts stored in dummy var

#1 Post by Patou » 17 Apr 2020, 20:51

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

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 18 guests