Trying to create if then else, type construct

You are making this far too complicated.

Add your lux condition to this: Motion activated lights automation