Somebody Home and Lux level equals?

I am trying to find an app that does the following, but failing miserably.

If any of our presence sensors shows that someone is home, and the lux level on my outdoor sensor falls below a certain level then turn on my lounge lights. No motion sensors, no auto turning them off after a certain time, just the above.

Anyone aware of an existing smartapp that does this, alternatively one that’s close i can modify with my externally limited groovy knowledge . . .



Simple rile builder can do t