Period of time doesn't work

I am setting up an automation to change the mode to home or night using a period of time if I am home.

When the time period comes around it does not trigger the mode to change. If I set it as a specific time (not a period of time) it changes modes fine.
I want it to be trigger to change modes if I return home during that period as well, so just setting a specific time (I’m assuming) won’t work. I can’t figure out how to get this to work. I would assume a lot of people do or want their mode to change based off of these same triggers, so I’m hoping someone can help.

Are you sure your location is still updating? Are other automations based on location working?

Yes, I’ve checked 4 times. Other location based automations work fine

Well I would help test it, but mine keeps turning itself off on the iOS version of the app :confused:

Im setting the home setting to trigger off of sunset instead, so we’ll see if that works in the morning

1 Like

The sunset/sunrise didn’t trigger it either

My phone location is showing as OFF but still reporting away/present properly.

In your testing, are those mobile presence devices already present between 5:33 and 6:33?

Based on this screenshot, I believe the automation is set to change the mode only if a mobile presence device arrives during that time.

Yes they are, but I tried it when they weren’t present. I had night for night time hours, and home for daytime. I looked under the history tab after returning home, and both night and home mode would activate almost simultaneously. Whichever activated second would be what mode it stayed in. So from what I can see time frames (both time based and sunrise based) are not working.

Well sunset to sunrise would also be a period of time (just a floating window of time). As a test, can you try with a specific time? And/or can you create an automation matching the above screenshot and add “Support” somewhere in the title of the automation (e.g. Night mode Support)? I can then take a look at see if the automation looks configured properly on our end.

I tried a specific time and it worked. However, it only triggers at that time. If I’m not home when that time happens it won’t ever trigger smartthings to go into that mode. I just changed it to have support in the name

Thanks. That was helpful!

I am fairly confident there is a bug here but I will need to sort it out tomorrow by the light of day.

It seems to tie back to some sort of incompatibility between member status and a period of time. Looking at the raw configuration of the screenshot above, and in attempts to replicate, the condition regarding time is not being set. However, if I swap member status for something like a device status, the time condition is saved as expected.

A less than ideal workaround that I believe would work would be creating a virtual switch tied to mobile presence and use the virtual switch’s state as the condition. So an automation would turn the virtual switch on when either mobile presence device arrived, and off when both departed. The automation from the above screenshot would then be modified to switch to night mode if the virtual switch is on and it’s between the set time.


Ok, thanks for taking a look. I’ll look up how to create a virtual switch. I’m also wondering if using webcore would work.

1 Like

You could likely do it with webcore as well.

I filed a detailed bug report for this issue and will keep this thread posted.


I thought all automations were triggered by events. How can a time range be considered a single event? It sounds like this is working as expected. The event is the presence sensor which also needs to happen during the defined time range.

Well I think there are two issues. The time range is being dropped from the automation on the backend (not visible to a user) but I also agree about the point about the event. I’m not sure if it is a UI issue or users should not be able to configure this automation.

I understand what the OP wants to do but the way the screenshot reads to me, is that “if a member is present between the period of time, change the mode”. The automation wouldn’t be continuously evaluating whether someone is present during the time period.

The automation should be “if a member arrives during this period of time, change the mode”. So I’m not sure if the text in the app is misleading or if the app is allowing users to create an automation that will never work. I pointed that out in my bug report so hopefully we’ll get an answer. :slight_smile:

Sounds good.

Any update? I’m surprised this hasn’t come up before. I figured most people would want their hub to go into night mode if they were returning home at night!

Hey Brad. Any word on this?

Hey there - same issue here - any news from the Smartthings team ?