Will this conditional action rule work

I have built a rule to shut off a bulb and then rearm my security system if someone disarms the system while in night mode. By the way I am very new to rule machine, so be gentle. If I could do it better I am open to suggestions

I also am trying to have a rule that can fix if the system fails to arm (say due to a open sensor). After looking at my second If then statement, do you think it would apply to this situation also?

I have change it and added an "ELSE" instead of the "End-If". Is this correct, will it work

Your first rule looks closer to what you want, though there's no reason to have two separate IFs that test for the same thing (if it's true when it reaches that second one, it was almost certainly true milliseconds ago when it reached the first one, so just putting all the actions inside one should work). However, that won't cause problems--it's just a bit odd.

But I suspect there are details about your setup we don't know, as your rule actions are a bit different from your description (perhaps intentionally and correctly?). Is your location mode (e.g., "Night") tied to your HSM mode in any way? Then this setup would make a bit more sense (e.g., if it would no longer be Night mode after disarming). This does not happen automatically and is something you would need to have configured in HSM or via some other means like a rule.

I also don't see a description of how you want to re-arm, so my first thought was "immediately." From your rule, it seems like you want to wait for a door to (be opened and then) be closed before this happens, but you're only waiting 5 seconds for that to happen before moving on anyway, so if the intent is to give you time to do something while it's disarmed, that's seems unlikely to happen. :slight_smile:

Maybe a more detailed description of exactly what you want to happen (and when/how) would be helpful if this isn't right. Otherwise, your rule looks like it should do something, noting the above caveats.

You can't write a rule to change this behavior; if the sensor is open, it still won't arm. What you should do here is look at the difference between the "must be closed when arming" and "auto-bypass when arming" sensors when you set them up.

Here is my thought process.
My security system auto arms using HSM. Hsm is basing the arming by the "Mode" my hub is in. I use the "Mode Manager" to define the the time for a mode. I have not got to tackling "Presence" yet. I am using Rule Machine to build this rule.

So now to what and why I am trying this:
Scenario: Someone comes home during "Night Mode". Disarms the system and lets say wakes up dogs and the dogs wants out. Then that person goes to bed and forgets to arm the system after letting the dogs out/in.

So that is why I want the "wait" before the system rearms. The light that I am turning off is a rgb bulb (HSM200) that I use to tell/warn a person the system is armed. So based upon that info here is what I do:

Trigger the Automation using
HSM becomes disarmed
Then conditional action ensuring the hub is in Night Mode
then shut off light
use a wait (I want a timer type wait, so that the time resets if the door opens and closes) for 5 minutes. The sensors must not of been opened for 5 minutes
Then rearm the security system.

I changed the rule, does this look better

That seems like it should about work, though if HSM disarming changes you out of Night mode, you'll need to re-think that conditional (if Night mode just puts HSM into arming but taking it out per se doesn't change your mode, you're good!).

One thing you'll want to look at: "timeout" on your wait will make it proceed when either the event happens or that time elapses (i.e., without any events). It sounds like you're looking for the "duration" option instead, which will make sure the resulting state remains that way for that amount of time before continuing. (I actually don't remember if that's available for "Wait for event" of the top of my head; if not, you'll need "Wait for expression," which you might want anyway unless you do want someone to have to open and then close a door to start this "timer" in the first place.)

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