Simple Automation Rules: Unable to turn-off light switches at a specific time

I have (5) Z-wave switches. I'm trying to turn-off a group of light switches at 1130pm every night. When i try to create the rule and select the time, it ignores my entry and simply creates a rule with a rule name of the Current Time. I have tried editing the rule with no luck. When i exit and go back into the rule, the time field is . There's also no way to set AM or PM and it appears that the seconds field isn't used.

Anybody have some insight?

1 Like

Hello, and welcome to Hubitat.

I have not seen this behavior before.

Can you tell us about what device (computer, Android/iPhone) and browser you are using to do this?

And have you checked to be sure you are using 12 hour time in Settings tab, Locations and Modes menu?

1 Like

And a couple of screen shots to illustrate what you're seeing would be helpful.

This time field is the one that is not working for you? You can't click into the fields and enter numbers to set the time, and hit A for AM or P for PM?


New user, they can't post those yet.

1 Like

True...he has to make x number of posts first.

In Settings>Location and Modes my time format is 12h.
I think I figured out part of the issue. In my browser (Firefox on Windows PC), the time shows up as ::__ I kept trying to enter 11:30:00 but it never worked. It turns out that last field (after the 2nd colon) must be AM or PM (really would have saved me a ton of time if this a dropdown box.
I revised the rule...i actually set it for 638pm. Looks like the log captured it correctly:
2021-01-12 06:38:00.068 pm [info] Turn Off Basement Lights at 6:38 PM Turn Off

HOWEVER, the actual switches did not Turn off. They are all Z-wave switches. I can turn them off manually in a dashboard and via Alexa...but the rule that fired (per the log msg) doesn't seem to actually turn them off. Any ideas??

OK peeling the onion on this problem...figured out another issue that explains things. When my switches are turned on manually (at the switch), hubitat still sees them as "off" - so when i send the rule to turn off, it doesn't do anything because it believes them to be "off". When I manually turn the switch "On" and then issue a "poll" in the device, it properly updates the status to "On" - then when the rule runs to turn them "off", it turns them "off". I guess the issue now is, how do i make sure to get updated status for the switch without manually running a poll?...or is there a possibility of creating a rule to re-poll every switch? Thx

IF your devices are Zwave and not Zwave Plus you can use the built-in Polling app. You also could use Rule Machine (it has polling capability) and poll every so often. I would (carefully) use the polling app and see what happens before diving into Rule Machine.

If you poll too many devices too often, you can saturate your Zwave mesh, and cause issues. So I would start with just a couple devices, and if that is OK do a couple more, until you notice problems. Also, I would only poll the really important switches. Things like a closet light you might not want to poll, or at least not at first.

I'm having the same exact issue with Zigbee light bulbs and ZWave switches. It seems like if there is a group or scene then the Turn Off command only works when it is set to Sunrise or Sunset but does not work for me consistently when set to Certain Time. I've found that the lights do turn off as scheduled when I manually instantiate the scene or turn the group on prior to or after the simple rule fires so my issue seems inline with the initial post. I hope that makes sense.

1 Like

Turn on the logging for the Simple Automation Rule that you suspect.

1 Like

This was all that was in the log for the automation and actual scene are below of one that didn't turn off. It is a simple rule that is supposed to turn a scene on at 10pm and back off at 5am. The log entries show the automation did an "anti-Turn On" event at 5am but it never made it to the Night Light scene. The Scene was create under V1.2 for Night Lights and currently says (Not Set). Let me know if you need more info. Thanks!

Automation Log Entries
app:3202021-02-16 05:00:00.173 am infoNight Lights(Not Away): 10PM to 5AM anti-Turn On
app:3202021-02-15 10:00:00.261 pm infoNight Lights(Not Away): 10PM to 5AM Turn On

The Log entries for the Scene Night Lights
dev:1302021-02-15 10:00:00.720 pm infoNight Lights was turned on
dev:1302021-02-15 10:00:00.338 pm infoNight Lights was turned on

I need to see the SAR setup page for this. Please use screenshots for logs.

Here you go and do you need me to resend the logs? Also note that 5am is when I transition from Night to Home but I have shifted the off time from 4:59 to 5:01 at various tests and the results are the same.

Please. Also, please show the Device Events (top of device page) for Night Lights.

I have some noisy devices (Sonos, Konnected Pro) so the logs are already gone from this morning but I can resend again tomorrow. It is the same behavior every day. The Night Lights Event log is below. I manually turned it off at 5:38AM. This is a good example because you can see that I manually initiated it on 2/14 at 9:18PM and it worked as intended (turned off on 2/15 at 5am). It is very predictable. If I turn it on manually then it turns off as expected. Otherwise it stays on.

It turned on from the app, evidently, at 10pm on 2/14, and then off at 5am on 2/15. What is very odd is that it turned off right after being turned on at 10 pm on 2/15. That is why it didn't turn off at 5:00 AM this morning. SAR only turns off a light that is on, and you can see that it was off. The question is why?

Please show the setup page for the Scene.

It is worth pointing out that Scenes are meant to be activated. Turning the Scene activation device off will in some circumstances turn off the devices in a Scene -- but this is not primary functionality. I would suggest that you either create an Off Scene or Group, or use some other means to turn these lights off.

Ok. I see it says off but the lights are On at a very low setting. I was using the simple automation to keep it simple but can obviously use RM instead and get rid of the scene all together I think.

It's not obvious to me why this doesn't work even with your explanation because I have 100% reliability with activating and de-activating the scene through the device page (On or Off command) or via the dashboard scene tile (On or Off) for Night Lights.

Also, it seems like the Turn On logs are more important than the Turn Off as it looks like that is where the issue is coming in. I'll make sure to grab those again tonight but it seems that if the lights are off and then I turn them on it has the On-Off-Off behavior so I can try now and see if that helps.

This is kind of odd (to me at least). When you look in Events you see the On-Off-Off behavior but as far as I can tell it isn't reflected between the Device Events and the System Logs so I wonder what the Offs are related to.

One of the devices in the Scene could have changed state, thus causing the Scene not to be set. That in turn will turn off the activator. Once it is off, as shown by the logs, SAR won't turn it off at 5 AM. Most likely the actual temperature of the bulb is not 2696. If it turns on and ends up at 2697, this would explain what you're seeing. Yes, turning the Scene on/off manually will work fine. But not for SAR, because if it sees the activator is off it won't turn it off.

Probably SAR should have a different option for activating a Scene instead of turning the activator on/off. A Scene activator is a special device type, and it is evidently not really going to work as you expect with SAR.

This will have to be addressed in the documentation. Attempting to turn off a Scene with SAR is not going to be reliable for the reasons above. Notice that the selector in Scene says "Which lights or switches do yo want to automate". That doesn't say Scene, and a Scene is not a light or switch.

Ah okay. That makes perfect sense to me now. So do you think that Scene control will eventually be added as a feature of SAR or should I do it a different way? Now that you added "Variable Time" to the Mode Manager I have more options. :slight_smile:

Download the Hubitat app