Nested if condition

Thanks for the great question! Often people think they need a nested logic condition when in fact choosing the right evaluation trigger simplifies everything. So, for example in your case, if you use the door sensor trigger to start a logicblock evaluation of an Apilio condition (that is being updated when people arrive/leave home) then no nested logic is required.

Have a look at It's dark, I'm arriving home, turn lights on....Please and Setting up Apilio Notifications with IFTTT App for more information.

Getting started - an introduction to Apilio is also a good place to start!

Hope that helps. DanT