Limit Scene to one specific day a week

I have a sensor on my milk box. The milk is delivered on Thursday but never at the same time. I want to be notified if the milk box is opened on Thursday but not on other days. The scene makes me pick a specific time. Help.

Create your scene to be notified, then add a conditional as shown here: http://forum.micasaverde.com/index.php/topic,18679.msg142023.html#msg142023

That’s a general form and is more complicated than it needs to be for your case which could be this:

local tNow = os.date("*t")
local dNow = tNow.wday
return (dNow == 5)

Although I think I recall that some notifications happen regardless of the conditional return from the scene. So you want to make sure you are notified via some action in your scene.

Or try using PLEG.

Thanks for the reply. I may have found my solution. I found that I could limit the device trigger to one day and I used the time from 12 am to 11:59 pm.