Multiple input conditions...

Thanks to RichardTSchaefer, I’ve got a working base…

I’ve got this code:

[code]TurnUpstairsHallwayLightsOn
!UpstairsHallwayLightsOn and UpstairsHallwayMotionTripped and (!UpstairsHallwayLightsOn; UpstairsHallwayMotionTripped > 10)

KeepUpstairsHallwayLightsOn
(UpstairsHallwayLightsOn and UpstairsHallwayMotionTripped and (UpstairsHallwayLightsOn; UpstairsHallwayMotionTripped)) or TurnUpstairsHallwayLightsOn

TurnUpstairsHallwayLightsOff
UpstairsHallwayLightsOn and !TimerUpstairsHallway and (UpstairsHallwayLightsOn; !TimerUpstairsHallway) and (!UpstairsHallwayLightsOn; UpstairsHallwayLightsOn > 10)
[/code]

What I would like to do is have it check not only UpstairsHallwayLightsOn, but also StairsLightsOn. So I did this:

KeepUpstairsHallwayLightsOn ((UpstairsHallwayLightsOn or StairsLightsOn) and UpstairsHallwayMotionTripped and ((UpstairsHallwayLightsOn or StairsLightsOn); UpstairsHallwayMotionTripped)) or (TurnUpstairsHallwayLightsOn or TurnStairsLightsOn)

But I get an errors that there was a “pleg attempt to compare two nil values”

I have the same issue with a sequence I’m working on this morning. I think your first problem is here:

(UpstairsHallwayLightsOn or StairsLightsOn); UpstairsHallwayMotionTripped)

I received the same error when using an operator in a sequence condition. Instead, create a new condition called “UpstairsHallwayORStairsLightsOn” which is satisfied with “UpstairsHallwayLightsOn or StairsLightsOn”. Then use your new condition in that portion of the sequence statement:

UpstairsHallwayORStairsLightsOn; UpstairsHallwayMotionTripped)

I think you might also have a problem using operators outside of the sequence in the same condition… but you can create intermediate conditions to work around that, as well.

You can’t use an expression as the arguments for the sequence expression because the Sequence operates on time stamps.

Inputs and conditions have time stamps.
There is no way to produce a meaningful time stamp from an arbitrary expression.