I’ve been working with Fidel at smart things via text for over two months trying to get Automations working. I want Automation operation Daylight to come on only if I come home and it’s after dark, I don’t not want operation Daylight to come on if I am already at home and it’s past dark.
It appears your problem may have been going on longer than the one in the following thread, but does it look similar to you? I ask because in that thread, you’ll see that smartthings staff say they have been able to replicate that problem but don’t yet have a fix for it.
Automatic routines not working as of yesterday (17 Sept 2023)
Yes very simalar and frustrating. Fidel has been having me go in circles trying all kinds of things and nothing works.
Considering your example Routine:
Although you have a condition for when you ‘arrive’, that is a slightly misleading. It is only an arrival if the Routine is being triggered by a change in your presence and you are indeed now present at home after being not present for at least ten minutes. So this is what you want.
If, however, some other condition triggers the Routine then the condition is only testing if you are present and that the last time you were not present, which could have been days ago, it was for at least ten minutes. So you don’t want that.
Your specific time condition is going to trigger your Routine at the exact moment you have specified and it will consider your other condition then. So that’s not what you want.
Instead you need to be working with something that represents ‘dark’ without triggering the Routine.
One way to do this is to use a time period. The catch here is that Routines only let you specify time periods using two specific times, or as ‘day’ or ‘night’ using offsets relative to sunrise and sunset. So if you don’t want your ‘dark’ to last until the morning you need a different approach. One that a number of users adopt is to use two additional Routines to turn on and off a virtual switch (or a real one) as required to signify ‘dark’ and then using that switch being on as a precondition in the Routine instead of the time.
As @JDRoberts has pointed out, some users have found there has been some weird stuff going on recently even when the logic is correct.