Someone moves into a space, so that space is now "occupied". Push out a lighting scene to the smart devices in that space based on some simple rules (is the sun above or below the horizon?) ... and then turn them off again when we're quite sure the room is no longer occupied.