Is there any way to set up a schedule for my motion sensor switches?

I've got my GE switches in Hubitat now, but I can't see anywhere, where I can have the switches only activate 'during the day' etc. I didn't really want my switches turning on in my Master Bathroom in the middle of the night, for example. Is there a way?

Use required expression.

1 Like

I don't see anywhere that has that field or 'required expression'. BUT, I did find a 'basic rules' app which I think will work?

This depends on what app you're using to create your automation, but if it's Rule Machine, the above provides one possible solution. It sounds like you're using something else. Most apps built for this purpose have something in them you can use to create the same effect--the old Motion/Mode Lighting apps, the new Room Lighting app, and even things like Basic Rule. If you can't figure it out, I'd share a screenshot or more of a description about your existing setup, and someone can help.

In general, what you'd want to do is address this at the app level (apps being the way you create automations on Hubitat). It is technically possible to disable the driver/device, whether that's for the motion sensor or the switch, but that's normally not the best way to do this kind of thing.

If you don't already have this kind of automation set up, Basic Rule, as you found, is certainly something you can use to start. In that case, what you'd want is "Restrictions," which I'd look at after you have it set up the way you normally want it to work.

1 Like

Are you referring to the GE/Jasco Motion Switch, one that had the built in motion sensor? If yes the stock driver doesn’t allow you to change the motion parameters but @JasonJoel’s community driver will. You can use this and then setup a rule to change the operating setting:

2 Likes

Ok, so I'm going to try the Basic Rule app, which I found in my apps. I think I have it set up so that when the motion switch detects motion ONLY during the day, it will activate the light. This is all I need, so it should work? One question, do I still keep the switch on 'occupancy'? Will the rule I created override the 'occupancy' setup at night time if I set this rule to only work in the day?

Thanks. Yes I am referring to those GE/Jasco Motion Switches. But how is this different than setting up a basic rule within the Basic Rule app?

To do what you want with the default driver you would have to leave the switch in MANUAL always, and then use the motion trigger in the Basic/Room Lighting/etc rule to turn it on/off.

That would work, but does rely on the hub 100% for light actions - if the hub is unavailable the lighting by motion stops working - and is slower than using the device's native behavior. Still might be perfectly fast enough though, so I'm not saying it would be SLOW doing it all in the hub, just slow-er than the option below.

The other option is to use my driver and then add rule(s) to put the switch in OCCUPANCY during the day, but MANUAL at night. Then the motion lighting still all happens at the switch during the day (which makes it noticeably faster).

Either path can work though.

4 Likes

I try to put it in Manual, but it doesn't save for me; it defaults back to Occupancy. I wonder if it's because I have a rule enabled now?

Edit: never mind. I wasn't saving preferences.

See, that's the thing...

If you use my driver there is a command button to change manual/occupancy. That is what you want versus setting it in preferences.

Rules can''t easily change preferences, but they can issue commands (even custom ones like these).

Note, Basic Rules can't do custom actions at all - you will need to use Rule Machine. An action like this in Rule Machine would work to set the device to MANUAL, for instance:

1 Like

Ok..I'll try to install your driver. Thanks!

One thing I noticed...for some reason HomeKit rarely registers the motion from these switches, even though motion is detected in Hubitat. Any idea here? It sucks because I have a HomeKit lightstrip I also want activated when there is motion detected.

No idea, sorry. I don't use homekit that way.

Maybe someone else will chime in though.

Edit..figured it out!

I use these switches in my three bathrooms.
I use @JasonJoel 's fine driver, and have it set to manual.
Manual makes it more flexible.
For instance, I have contact sensors on each of the doors, and when the door is closed the lights won't time out.
Also, I have it do different behavior after 11;30 PM, like motion won't work after that time-the door has to be closed, and then the lights and fan come on.
I did this all with Simple Automation, mostly because I didn't know better at the time.

All this to point out that having them split up, and not using "Occupancy" mode is a lot more flexible.

I could be wrong though-speeding up anything would always be nice. :slight_smile:

I have found that the "Simple Automation Rules" app to be the easiest for this kind of effort .

https://docs2.hubitat.com/apps/simple-automation-rules

Here is my example:

This light switch has a built-in motion sensor.

So as mentioned above, rule machine is probably the best (only) option to enable and disable it at different times of the day, because unlike basic rules or simple automation rules, RM can send the custom commands that are needed.