• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Exclude Weekend from a rule
#1
Hello all,

i have a Problem by excluding the weekend from a rule. As far as i see, it should work, but i does not. Hereis the rule:

Code:
IF (DATE_FORMAT(dt, %H%M%S) == 063010) AND (dt.weekday < 6 AND dt.weekday > 0) THEN switch DEVICE SWITCH TO up"

So as far as i undersood, the rule maches, if the day is before saturday and not sunday.

Does anyone see what i cannot see?

Best Regards
Thomas
 
Reply
#2
This part is always false. Just check if with all 7 days.

Code:
dt.weekday < 6 AND dt.weekday > 0
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  Rule triggers twice Thorben653 13 2,020 02-05-2020, 01:06 PM
Last Post: VicktorKopf
  [Solved] On and Off for one device in one rule Oliver 3 657 10-28-2019, 06:55 PM
Last Post: Oliver
  [solved] sunset rule doesn't work fleisch 4 671 10-26-2019, 07:05 AM
Last Post: fleisch
  Rule with&without device. One working not the other... Tamadite 9 1,740 07-24-2018, 08:55 AM
Last Post: curlymo
  rule executed once at start up segalion 3 917 07-12-2018, 05:28 PM
Last Post: curlymo
  Problem with executing bash script via rule/program dYna 1 1,214 02-15-2018, 09:06 PM
Last Post: dYna
  Rule Sunset works, Sunrise not apartmedia 1 1,345 12-05-2017, 07:09 PM
Last Post: apartmedia
  Problem with a Rule for a One Button Switch martin-dj 1 1,503 03-06-2017, 12:01 PM
Last Post: pilino1234
  Rule executed at wrong time philipp81 1 1,099 02-25-2017, 10:43 PM
Last Post: curlymo
  Rule is executed repeatedly Niek 3 1,764 11-09-2016, 10:22 PM
Last Post: wo_rasp

Forum Jump:


Browsing: 1 Guest(s)