This object is in archive! 
Fail: Date expected
Answered
I´m trying to create a very simple rule, but get an error saying Fail: Date expected.
I want an alert of some kind, lets say a change of light from a lightbulb ,if my garage door is open after 10 PM.
My rule is this:
WHEN garagedoor = Open
IF TIME NOW BETWEEN 22:00 AND 06:00
<some lightbulb> ACTION GOTOVALUE = 100
Under My Home Rules, it´s also labeled "INVALID"
What am I doing wrong?
Files:
Date expected.png
No connection
Real-time notifications may not work
you must use a time select control from variables section, don't write time (i don't know why it is allowed)
you must use a time select control from variables section, don't write time (i don't know why it is allowed)
Hi, you should use time of (now) - rule example is attached.
Hi, you should use time of (now) - rule example is attached.
Thank you both for your responses. In case anyone else drops in on this thread; don´t forget to set timezone in your Controller settings :) That was obviously one fault. In adition to that I changed to the the "time select"-controll as you said Martin. That did it. Thanks!
Ivica, the "TIME OF (NOW)" function also worked, but it didn´t look like it was necessary (I appreciate if you will share the difference with the TIME and TIME OF function).
But I discovered that this rule didn´t do the magic anyway. This only run if the door is beeing opened (changing state from closed to open). I want a rule that checks every day at say 22:00 if the door is allready open OR if it´s open when it gets dark (at some luminance value) - whatever comes first of the two. I guess I have to use the "Scheduler configure" block in some combination with lumiance check. Any suggestions are much appreciated :)
Thank you both for your responses. In case anyone else drops in on this thread; don´t forget to set timezone in your Controller settings :) That was obviously one fault. In adition to that I changed to the the "time select"-controll as you said Martin. That did it. Thanks!
Ivica, the "TIME OF (NOW)" function also worked, but it didn´t look like it was necessary (I appreciate if you will share the difference with the TIME and TIME OF function).
But I discovered that this rule didn´t do the magic anyway. This only run if the door is beeing opened (changing state from closed to open). I want a rule that checks every day at say 22:00 if the door is allready open OR if it´s open when it gets dark (at some luminance value) - whatever comes first of the two. I guess I have to use the "Scheduler configure" block in some combination with lumiance check. Any suggestions are much appreciated :)
Correct. Rules will only run on a "trigger". Whether this trigger is data sent back from a sensor, such as a door sensor, temp sensor, switch sensor, weather sensor, etc. or time based event.
Beak this into 2 rules.
1. that uses the scheduler to run a rule at 22:00. Remember the Scheduler block ALWAYS has to be in the 1st when block. Then an IF door open.
2. Either a scheduler using the Sunset astro, or a luminance sensor meter value.
If you only want one to run once per day. I would then create a virtual sensor, and have the rules check if this sensor is inactive, then run the checks(after the scheduler when block) then set the virtual sensor to active at the end of the rule. Then create 1 more rule to reset the sensor at eg 10 am (the next day. This will stop it from re activating in the early hours of the morning, unless this is what you need then reset it at midnight.
Correct. Rules will only run on a "trigger". Whether this trigger is data sent back from a sensor, such as a door sensor, temp sensor, switch sensor, weather sensor, etc. or time based event.
Beak this into 2 rules.
1. that uses the scheduler to run a rule at 22:00. Remember the Scheduler block ALWAYS has to be in the 1st when block. Then an IF door open.
2. Either a scheduler using the Sunset astro, or a luminance sensor meter value.
If you only want one to run once per day. I would then create a virtual sensor, and have the rules check if this sensor is inactive, then run the checks(after the scheduler when block) then set the virtual sensor to active at the end of the rule. Then create 1 more rule to reset the sensor at eg 10 am (the next day. This will stop it from re activating in the early hours of the morning, unless this is what you need then reset it at midnight.
Thank you Adrian! I also figured out that breaking this into two rules was the best way. I´ll give it a try with the virtual sensor. Thanks again!
Thank you Adrian! I also figured out that breaking this into two rules was the best way. I´ll give it a try with the virtual sensor. Thanks again!
Replies have been locked on this page!