My rule looks a little funny to me

image

I'm trying to say if "mode is night" is true then do this. It doesn't seem to be that way. Maybe 'mode' is handled differently but it doesn't look the same as "soffit lighting". Do I have this right?

The values in parentheses are current evaluations of the conditions and the entire expression (both the same in your case since your expressions comprise a single condition). If you have action logging enabled, the same will show in Logs and give you the then-current evaluation. This can be helpful for troubleshooting, but whether or not these are displayed (it's an option you can turn off) has no effect on execution.

It sounds like that's what you're asking?

See also:

You could combine those 2 conditions (Mode = Night and Soffit = Off) into a single IF statement (connect them together with an "AND"). That would be a bit cleaner overall.

Thanks. I guess I thought "mode" would be like other variables in that you can say true or false. I see that its a different and all is good.

Thank you. That does make it a bit cleaner.

It is. Mode is apparently currently not Night, hence that condition (and the expression that contains solely this condition) is false. The UI is just displaying this current state in case you find that helpful. You can turn it off if it's just clutter for you.

(Reading this again, it sounds like maybe you're asking about a different issue, whether you can create a "NOT" for this condition, which is also possible--but not anything shown in that screenshot.)

Yes, I can do a 'not' for it. I was seeing that 'mode' is done a bit different than say 'soffit'. But it all works out. In the creating of the expression you don't get to say true or false like with other variables. So it looked kind of funny to me. But its designed that way so its all good.

Your "Soffit Lighting" appears to be a switch, which would have "on" and "off" values.

"Mode" is a Hub Global Value and is actually a string variable, so it can't be "on" or "off", just testable for some particular value.

Your first rule action is to toggle doorbellā€¦ Is that meant as the trigger (what will trigger the rue to start)? If so, it should be under trigger rather than actions.
Here is how I would write this rue:

ā€”-
Required Expression:
Mode is Night

Trigger:
Door Bell button pressed

Action:
On: Soffit Light
Wait for event: Elapsed time: 0:10:00
Off: Soffit Light
ā€”-

The wait instead of a delay wil ensure that if the light is pressed more than once, the 10 minutes will start counting at the last one.

No need to check that it is off to run the rule in that case.

1 Like

The doorbell is an action not a trigger. The trigger is an end point from a blueiris camera. If someone comes to the door the camera sees them and blueiris sends an endpoint trigger to Hubitat so that Hubitat can turn on the soffit lights for 10 min and then turn them off. I don't want to run this if the soffit lights are already on. Which most of the time the soffit lights are on by a rule from 8pm to 10:30pm. The doorbell causes Alexa to announce that "someone is at the door".
The doorbell is a virtual switch that is toggled so that Alexa can see it and make the announcement.

1 Like

Thanks for the info about the wait and delay. I didn't know that. Always good to learn new things.

2 Likes

I'm curious why you have a delay of zero seconds on the 'toggle: door bell' action. It probably isn't hurting anything, but it also isn't doing anything.

Left over from some testing. I'll remove it.

Got it! :blush:

In that case, you can add: Ā« Soffit lights are off Ā» as another required expression.

I am thinking he wants the "Toggle: Doorbell" to run regardless, since it triggers his Alexa announcement. In that case, that would not occur if the lights were already on with the required expression. (I have my camera set up to alert "someone's at the front door" ANY time it sees a person.)

1 Like

Correct - I understood the reverseā€¦ thatā€™s the fun thing about communication - same message, different understanding! :blush:

1 Like

Yes, that's correct. Ring the doorbell all the time.
It seems to work, just looked a little funny to me.

1 Like