Correct way to configure this type of rule

Simple rule using the basic rule app-
Ideally, should i be running two separate rules for the following or is it preferable to incorporate them as ONE rule?

RULE 1
if PIR 1 activated turn ON light A
conditions- between sunset and sunrise
RULE 2
when PIR 1 stay inactive for X mins turn OFF light A

guessing its probably more efficient to have in one rule but is it easier to fault-find or configure using two rules? Maybe different users have their own reasons for the two options.
Please share your thoughts.

I don't know that there's a "correct" way...

I don't use basic rules much at all but in general I think it's easier to split things into two rules for all the reasons you mention. I'm not sure there would be much efficiency gain. On the other hand if I was doing it with RM I would probably jam it all into one rule :slight_smile:

For this particular use case you might want to consider a single room lighting instance.

As above, I suppose it's a matter of preference, but I don't see any reason you couldn't put this all in one rule, assuming there's no reason you can't (like if you want different restrictions for both--keeping in mind that Basic Rule does have options for what to do with pending actions when restrictions become in effect, which can accommodate common cases like this where you probably still want it to turn off if it was turned on).

In terms of efficiency, there should really be no difference: either creates an event subscription (or two, one being temporary with the one-rule approach), which will wake the app when it happens and do whatever it is.

thanks for the replies.

out of interest, is it possible "nest" rules in folders or group by room-collections, ie rules for the kitchen, rules for the bathroom, etc. Just to keep things organised and tidy.
I imagine those with large or complex home automation have a long list of rules to scroll through so may have tips for keeping organised?

Organized with icons
image

I've seen the emoji trick above; the other key is that these are sorted alphabetically, so careful naming can also help (e.g., room name at the front or whatever works for you). They've hinted that they are looking at ways to organize apps in the future, so we might get something eventually; for now, this is what we have to work with.

But regardless of how they are named or organized, it is often more useful, at least on some occasions, to know what automations are using a particular device. This is easily done from the device detail page for that device: scroll down to the "In use by" section, and you'll see all apps that reference this device. Another trick to know. :slight_smile:

Yes indeed. I name them starting with room name, and if they don't apply to a particular room, I precede them with something that identifies function. I do the same thing with sensors even though they can be grouped.

Master Bedroom - AC control
Notify - cat stuck in closet

That sort of thing

I just set up that rule within the Room Lighting app.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.