You can target entities by their NBT. For example to target an entity on the ground, type in: {OnGround:1b}