Change behavior of all smart switches in the home based on time of day?

I’m brand new to SmartThings and just trying to get the hang of how everything works. I have ~20 Zooz dimmers connected to ST. I’d like a way to set the behavior of all switches equally based on the time of day without creating an automation for each individual switch.

For example, I would like the lights to turn on to 100% when the switch is pressed between 0700 and 2000, but between 2000 and 0700 I would like the lights to turn on to 20%. Is there a way to set home-wide rules for device behavior like this?

1 Like

I just realized I misunderstood your question. Unfortunately, the answer to the question that you asked is no, there is no way to set a filter that would apply to any possible automation or other activation of any possible switch based on a particular time of day. You have to create individual automations. Each automation can include more than one switch but you still have to list each switch in an automation.

You can put a bunch of lights into a scene and activate a scene, but I realized after writing my first answer that that wasn’t what you were asking.

You can “sort of” do this with webCoRE…

Set a device list variable that includes all the switches.

If any of the “devices” changes to on
Time is between x and y
And mode is…
Then set lights to x%

Repeat for other times and modes…

Note that lights will come on at their last settings but change to the specified level shortly after.

You would need to be able to set just the one that came on to the time based filter, though. Otherwise some of the other lights in the list might come on when they were already off, which isn’t what you want.

Also… my concern about this kind of blanket filter, regardless of the home automation system, is that it ends up overriding what people are trying to do manually.

Let’s say you have your basic rule that if it’s between midnight and 6 AM, the lights should only come on to 20%. So far, so good, that takes care of the usual trip to the bathroom or to close the window.

But suppose you wake up because you heard a crash. Do you really want the light to keep resetting itself to 20%? What if the crash was your cat knocking over a vase, and now you need to pick up a whole lot of small pieces?

what if you got up because your child is sick and you are trying to get the medicine ready, but the light keeps resetting itself to 20%?

What if you’re just coming home from a party?

What if your grandparents are visiting and they need very bright light to see anything?

Anyway, you get the idea. Time-based blanket rules, particularly ones that reset a device when it is turned on in another fashion, run the risk of forcing a setting that may not be desirable for these kind of edge cases. :thinking:


I know this doesn’t solve your issue “with out using automations” but I am new to SmartThings as well and did this with automations and the Ikea 5 button remote. The only part of doing this that I didn’t care for was that I wasn’t able to duplicate an existing automation and then make two small changes (time and dimmer level). I personally haven’t looked into WebCore.

As says @JDRoberts it cannot be done in a general way. You have to configure only the device that you have turned on and therefore either with automations or webcore you have to configure the command to each switch one by one.
Therefore, thinking that the automations are going to be local in a short time, I would choose to do automations and if you can, reduce the number of switches to control.

It is laborious to write them, but to facilitate their writing, general disabling and easy schedule maintenance, you could use the night location mode as a precondition, but if you already use it for other automations, the following, I think is better:

  • Buy a cheap smart plug, ikea, lidl … (10 to 15 €), it depends on your region. It could be done with a simulated switch, but you would lose the local execution.
  • Name it, for example as 100%.
  • Set switch 100% quick controls to: Turn on at 7:00 a.m. each day and Turn off at 20:00 each day.

Automation 20% for each light:

  • IF switch 100% is off AND switch X is on THEN switch X to 20%.

Automation 100% for each light:

  • IF switch 100% is on AND switch X is on THEN switch X to 100%.

possibilities of use:

  • If you want to change the schedule: only change it on the Switch 100% and it will be changed in all automations.
  • If you want to disable all 20% automations: Activate the switch 100%, by voice, scene or directly in app or plug.
  • If you want to disable only one automation: You deactivate it with its toggle switch.
  • If you need more light than 20%: Press the dimmer at the desired level and it will remain so until the next off and on.
  • You can configure a different night level in each switch, 20% may not be ideal for all rooms.

I will preface this by saying that I am a big proponent of webCore, using for the vast majority of automations (though its future is in question :frowning_face:).

I think what @rontalley is hinting at is a great option, though I believe the best deisgn is to set the currentEventDevice to % rather than the list of lights. The piston would subscribed to the list of lights but only act on the specific device that is turned on.

By targeting the currentEventDevice, you would not get resets to the 20%.

Final result would be that a specific light is turned on and sets to 20% initially, if you needed to manually adjust level for any reason you can, there is no reset to 20% via the automation until you turn that switch off/on again. Additionally, since we are only targeting the specific device that came on, actions on other switches would not affect that manually set switch (again, until it is turned off/on).

*I should also note that it is always important to consider those exigent circumstance when designing automations.

In this case, my thought is that when the need to manually set the dimmer level arises, you are most likely turning the switch on manually and therefore have immediate access to ramp up the level (either via physical switch or voice command depending on your setup). If the switch is being turned on via other automations (for example, based on motion) then you would have to find your way to the manual adjustment access point to increase level. Doable but not always convenient and at least you aren’t in the dark with 20%.

1 Like

CurrentEventDevice sounds like an excellent suggestion. :sunglasses:

As always, different things will work for different people. I myself am a quadriparetic wheelchair user, so I can’t manually adjust most switches. I rely a lot on voice and motion sensors. And my grandfather has good mobility but failing eyesight: 20% might as well be totally off to him.

But the point is just that it’s good to think these things through in case one of these edge cases is relevant. They may not be. :thinking:

1 Like

By using “Changes To” on, any other level adjustment wouldn’t register a change because the light is already “on”. $Currenteventdevice would work great in this situation.


SmartApp “Dimmers Time Based Filter” that I have made, based on the open code of Left it open and gentle wake up, does what you are looking for. As long as IDE works you can use it.


  • Select the dimmers you want to control from your home list.
  • Select the minimum and maximum level for the required low level period (night?)
  • Select the start and end time of the required low-level period.
  • If you want, you can not choose the time period and choose the location mode in which you want a low level (Night … other …). you can select both, but it can be confusing.
  • Enter a name for the smartApp. You can install the ones you want. if you need to make groups of lights with different periods and levels.
    Note: don´t need select mode in the last field "Set for specific mode(s). it is default field"
  • Click Done.
  • If you want to temporarily disable the smartApp, turn off its toggle switch.

If you need more light level, press the dimmer at the desired level and it will remain so until the next off and on event.

Steps for installation:

  • Copy the linked code
  • Open your IDE
  • click on “My smartAPPs”
  • Click in “+ New samartApp”
  • Click in “From Code”
  • Paste the code copied from the link
  • Save and publish the SmartApp

You already have it in your smartthings App, open and configure it.
If you need any clarification or you see something that does not work well, tell me

UPDATE 1: Modified code to send the new light level only to the device that generated the “switch on” event.