Execute Routine at 8 PM +/- 15 minutes


#21

Yes, but keep in mind that the command:
IF time happens daily at 8:00AM
will run the entire piston top to bottom.

Alternatively, the "every 1440 minutes" command will only run that one block at the designated time


#22

Stupid question…how can I create a Every / Do / End Every block without the the “with {$location]”?Vacation%20snippet%202


#23

In the main “DO” section, click on:
+ add a new statement > Add an action > Add a task
It will automatically default to “location”, but it will be hidden from the final code.


While editing, it will look like this:

temp


Once saved, it looks like this:

temp


#24

At what time will “every 1440 minutes” actually run? The 24 hour “anniversary” of the last save of the piston?

It really doesn’t matter, I guess, as long as it runs once daily.


#25

That is correct. The countdown starts over each time you edit and save the piston.


#26

Hi, WC. Is this a better approach to getting an action to occur at a random time in a 40 minute window beginning at 7:40 pm? I put this into a separate Piston.


#27

Either approach should work, although I have not tested your last piston…


I can say with confidence that this would definitely work:

temp


#28

I just noticed your earlier question…

This is usually brought to my attention while editing the expression box.


#29

I tested the new one twice and it worked fine.


#30

@WCmore…Hi, WC. Things are working well. Really appreciate your previous help on this project.

I want to improve the functionality a bit. I’ve got a " Aeotec Multisensor 6" in the north-facing living room that SmartThings Smart Lighting uses to turn on living room lights on dark afternoons (when Lux <200 after 1 PM). On overcast days lately, lights have been reliably turning on in mid-afternoon which is great.

The logic we worked on previously starts the lighting vacation randomization one hour before sunset. I want to start the lighting randomization as soon as the lights go on in the afternoon due to low light. To do this, I created a virtual (simulated) switch “vLuxLow” which Smart Lighting sets to On when low lux is measured after 1 pm. I modified the webCoRE logic to use this virtual (simulated) switch such that the vacation randomization now starts when the living room is dim OR one hour before sunset. That way the randomization always starts before sunset even if the room does not go dim. See Lines 32-38 below.

Previously, Line 32 was “Time is Between 60 minutes to {$sunset} and 10:30:00 PM.”

What do you think about this logic change? Is this the right / best way to do this? Note that Line 114 sets vLuxLow Off after 11:30 pm for re-use the next afternoon. Also note I chopped out Lines 50-109 which are just repeats of the if/end if block in 40-49 for other devices.


#31

It looks really good, @OldPro!