I am not doing much sophisticated with ST but I am hitting limitations in the basic apps/automatons like Smart Lights. The conditionals are very basic and seem to boil down to “do this if any of these happen” … well, I would like a little more control but I can’t quite see it - maybe it obvious or maybe it’s not possible.
As an example, if I come home (any presence sensor arrives) then switch to home mode and if it’s dark outside then turn on some lights. I can’t do this in the basic app, is that right? I can set home mode AND turn lights on but I get no control over time of day etc.
The way I read the config flow in the mobile app you have to follow the predefined conditions. Is there a proper way, primarily using official apps, to “do X and then Y but only if Z?” and other more complex logical choices?
Smart Lighting is the best built-in tool for instituting basic rules and actions. But many, like you find it woefully weak for anything other than just basic rules/actions. webCoRE is definitely more powerful and capable. It’s infinitely more powerful. It’s only ‘issue’ for those that want to only run things locally is that webCoRE runs only in the cloud. For me, it’s an easy decision to use webCoRE, but your needs and requirements may be different.
I’m not sure about the new “SmartThings (Samsung Connect)” app, which has a different rules engine, but in SmartThings Classic you do get some stacked conditionals through the “more options” at the end of the automation setup screens.
Official knowledgebase article:
As you were configuring this simple automation, you may have noticed other, more advanced options. Smart Lights lets you add several restrictions and parameters to totally customize your lighting automations.
If you’re ready for the next level of automation, keep reading to learn how to:
Turn on the hallway light when you arrive home, but only between 5:00 and 10:00 PM on Saturday when the Mode is set to Away.
It’s not easily discoverable, but it is there. As others have mentioned, the biggest advantage to the official smarts lights feature is that at present, it’s just about the only thing that can run locally. Everything else runs in the cloud, including CoRE and webCore.
(Timeout for a terminology note…in a SmartThings context, “Core” refers to a specific custom rules engine built by the community to add functionality missing in the official features. This later evolved into WebCore. So anything you read in this forum about “Core features” is pretty much the opposite meaning as “something provided in the official app.” So “Core can do that” means “The official features don’t do that, but the custom rules engine built by the community can.”
Anyway, start by checking out the advanced options at the end of the official features and see if they fit the specific use case you are trying to automate. If it’s just a matter of adding day/time or Mode restrictions, they probably will.
If they don’t work for your desired rule, you can move on to WebCore.
Which is exactly what would happen with two separate automations. If you don’t want multiple routines and/or Smart Lighting rules, then look into webcore. But then you lose any chance of an automation running locally.
If it’s by a specific time of day, such is between 6 PM and 6 AM, you can do that with the official smart lights feature in SmartThings classic.
If it’s based on sunset time, such as sunset to sunrise or sunset to midnight, again you can do that with the official smart lights feature In SmartThings classic.
In both cases, you set the time constraint at the very end of the automation under the “more options“ selection. Those are treated like an “only if” constraint: so “do A when B, but only if…”. That works well, it’s just they don’t give you very many selections to choose from for the constraints In the official smartlights feature. But they do give you time and day options.
If it’s based on the lux reading from a sensor, things get more complicated. You could do it with two automation, the first one which sets the mode to home when you get home and then a Second one based on a light sensor which only runs in “home” mode.
Or again you could use webcore.
It just depends on the exact details of what you were trying to accomplish.