I thought this would be fairly simple. I'm trying to have my entry light come on when the front door opens at night. Both the door contact sensor and the light switch are z-wave.
In Rule Machine, I have the trigger event of the front door contact opening. In actions to run, I have entry light on with the condition of between sunset and 2300.
The condition you have is not actually in the rule. Creating a condition does not mean it is being used. You need to create a if statement in the rule.
If <condition>
Light on
End If
An alternative, assuming your trigger is the door opening make the condition a required expression.
Also note that if you want the light to turn off when the door is closed, nothing in this rule will do that. It would be possible to do something like that in this same rule (not that I normally encourage doing a bunch of stuff in the same rule for no good reason, but this is a simple enough case where it makes sense), or, of course, another one could do that, too.
But I might suggest Simple Automation Rules or Basic Rule for this, either of which can handle this automation -- including the restriction -- with ease. RM can certainly handle it too if configured with the right settings, but it is more difficult to get started with. Good luck!
You need to move the action down under the if. As written it will turn on and then check the condition. As others have said, moving that condition into a required expression would be better
It looks like you switched to using a required expression, which seems the better way to go here, but just for completeness, your screenshot above is missing the "End If" as the third action. You would need to click the "END-IF" at the bottom of the table to add it.
Not sure that will do what you want. Not 100% sure of your situation but if the door is opened someone is probably home, yes? Which will mean the light will probably never go off since you check it immediately after the trigger. Probably a delay before the IF would be better. The wait for event is probably better than a delay, as it will stop the rule and restart on a trigger. If you use a delay, then another instance of the rule will be started. Turning the light on is missing but it should still be there, just forgot to put it in the example.
I do this with a simple automation rule. Mine is in the basement so I always have them come on, but you could easily add the restriction for time of day/illuminance.