Motion LIghting vs Simple LIghting

You might also take a look at the Rooms Manager app.

It's a bit tricky to get setup at first because (IMHO) it's overly complex for simple occupancy, but otherwise works well.