Best way to Accomplish Wait and Else actions post-WebCoRE?

Hey guys, I’m working on determining the best method for converting my 36 WebCoRE Pistons over to the new world and one issue is that I don’t really know yet when a piston will work fine as a SmartThings Routine, or if I need to save that for after I dive into SharpTools (which I plan to do after converting all the low hanging fruit over to SmartThings Routines).

Can anyone tell me if there is a way to do things like this that involve waiting using a Routine:

At a certain time, every day, do this if this contact closure is open, but if it’s closed, wait until it is open and then do the thing.

Another is an Else type action:

If a switch is turned on, so long as the wattage of that switch is between a certain range, do this. Else, if it’s within another range, do that instead.

If not possible with Routines, can someone give me hope that I will find this functionality in abundance and simplicity once I start using SharpTools?

This can be done in automations by setting both the time and open status as a trigger. You have the option in the app to choose whether or not both things must be true or either must be true. You would choose both as the trigger.

This can also be done, but as 2 automations. Again, you would have a dual trigger of the switch and wattage. One automation would use a wattage greater than, while the other would use less than.

also check out Rules API

1 Like

Thanks for the reply.
For the first one, when I setup both a time and open status as triggers, it does not give me the any or all option that i see if I were to say use two switches or a switch and a contact closure. Regardless; if I do leave it with both triggers, how do I know that it will only trigger the first time it detects an open status after the time I set each day? Is that the default function? I am also unable to set time as a precondition.

That’s right. Times are always preconditions in the app. There are three options for the time. Specific time, period of time and any time. Specific time only happens once per day, the others can be toggled to only run once per day. I don’t believe this option with trigger for the case when the switch is on BEFORE the specified time, but it will work for AFTER.

Another option would be to use a virtual switch and tie it to the time of day. You would choose the period of time option and use it to toggle the virtual switch on and off, with on occurring during the period.

Then you can use the ALL logic of your virtual switch and physical switch in a different automation.

If interested, you can use my virtual hub kit driver to accomplish that. The purpose of that driver is to enable these more complicated behaviors and workflows on the hub itself. It runs locally, so thats at least one win over webcore :+1:

1 Like