Rules - On Clock - Variables - Logic

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
obod0002c
Normal user
Posts: 119
Joined: 10 Aug 2019, 20:31

Rules - On Clock - Variables - Logic

#1 Post by obod0002c » 07 Dec 2021, 18:35

sorry, me again.
I'm wondering about this evaluation, is that correct?

Code: Select all

On Clock#Time=All,18:24 do
 if [BewaesserungL#AnzahlJeTag] >= 1
  timerSet,1,1
 endif
endon
On Clock#Time=All,18:25 do
 if [BewaesserungL#AnzahlJeTag] = 1
  timerSet,1,2
 endif
endon
if [BewaesserungL#AnzahlJeTag] >= 1
 On Clock#Time=All,18:26 do
  timerset,1,3
 endon
endif

Logging:

Code: Select all

192027224: EVENT: Clock#Time=Tue,18:24
192027238: Calculate: Unknown token
192031779: WD : Uptime 3201 ConnectFailures 0 FreeMem 21784 WiFiStatus 3 ESPeasy internal wifi status: Conn. IP Init
..
192060506: EVENT: BewaesserungL# AnzahlJeTag=1
..
192087223: EVENT: Clock#Time=Tue,18:25
192091779: WD : Uptime 3202 ConnectFailures 0 FreeMem 21784 WiFiStatus 3 ESPeasy internal wifi status: Conn. IP Init
..
192120507: EVENT: BewaesserungL# AnzahlJeTag=1
..
192147223: EVENT: Clock#Time=Tue,18:26
192147241: ACT : timerset,1,3
192150243: EVENT
  • why is 'Unknown token' reported for rule#1 (18:24)?
  • why's rule#2 (18:25) skipped?
  • why does only rule#3 (18:26) provide what I was expecting three times?
Thanks for your help

User avatar
Ath
Normal user
Posts: 3415
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Rules - On Clock - Variables - Logic

#2 Post by Ath » 07 Dec 2021, 19:04

There are a few issues with your setup and your rules:
Setup:
- The event for "192120507: EVENT: BewaesserungL# AnzahlJeTag=1" has a space between the # and AnzahlJeTag, why is that, did you add that space in the device value name? It must be removed.
Once that is fixed, the "if" commands in your rules will start being evaluated.

Rules code:
The third "TimerSet" command is executed because the "if" around the "On Clock#Time=All,18:26 do" is ignored, as that can only be inside an "on <event> do" section, like you did in the other event handlers, and there is no condition within the on..do handler.
/Ton (PayPal.me)

obod0002c
Normal user
Posts: 119
Joined: 10 Aug 2019, 20:31

Re: Rules - On Clock - Variables - Logic

#3 Post by obod0002c » 08 Dec 2021, 10:20

working fine, Thx

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 32 guests