Trigger: open closed *changed*

I have am RM4 rule that used a contact "open" as a trigger and it doesn't seem to work the way I want.

Looking through the forum is see many suggestions to change "open" to "changed" and add a condition in actions. OK

Then I'm left with not understanding the proper use of open (or closed) vs changed in a trigger.
Logically I would think "open" would trigger when the contact became open.

I looked through the documentation and could not find an explanation of the proper use (although it might be there).

Also is there some significance to the * before and after changed?

Any hints?

John

Honestly not sure why that would be a general recommendation. It certainly depends on the actual automation you want to achieve, but I think your understanding as you stated it is correct. Basically, something like this:

Trigger: Contact *changed*

Actions:

IF (Contact is open)  THEN
  // Do things
END-IF

Is equivalent to this:

Trigger: Contact opened

Actions:

// Do things

The latter is, of course, easier to write--a lot fewer clicks. It also makes more sense to me to write it this way since you don't need to perform any checks (conditionals) yourself--just let RM handle that for you before the rule even triggers. You might see a recommendation to use a "changed" trigger if the intent is to do something like this:

Trigger: Contact *changed*

Actions:

IF (Contact is open)  THEN
  // Do things
ELSE
  // Do other things
END-IF

But that's rarely the only way to write a rule, as often something like this could work instead:

Trigger: Contact opened

Actions:

// Do things
Wait for event: contact closed
// Do other things

This is also a bit simpler to write, and while I usually wouldn't worry too much about details like this, it's also likely less work for Rule Machine, too (the rule will only wake for one specific event, at least initially, and you don't need to perform a check to see what it was). But sometimes I think there are things that easier to think about in one of these paradigms versus the other.

No, that's just how they chose to display "changed" in the UI, perhaps to make it clear that it's not an actual, specific event but just literally any change.

Hopefully the above helped explain things in general, but if you're still wondering about something specific, I'm sure you'll get a few ideas from others (or me) here if you share what you're trying to do and maybe what you've tried so far.

Good luck!

Thanks for the reply.

I'll have to make a test rule with a contact sensor sitting on my desk to find out why my rule is not triggering the way I think it should.

John